B2021-088 Fixed approval logic so that it will generate approval/workflow versions of Child procedures.

This commit is contained in:
John Jenko 2021-08-27 19:48:38 +00:00
parent 00bc9cea50
commit d503cf96f9
2 changed files with 13 additions and 4 deletions

View File

@ -903,10 +903,11 @@ namespace VEPROMS
// Also check that format allows override.
ChangeBarDefinition cbd = DetermineChangeBarSettings();
int profileDepth2 = ProfileTimer.Push(">>>> CreatePdf.GetItemAndChildren");
if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
else
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
// B2021-088 moved this if/else to frmPDFStatusForm() so that the Approval logic will have access to this logic
//if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
// MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
//else
// MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a"," | "));
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);

View File

@ -84,6 +84,14 @@ namespace VEPROMS
}
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf)
{
// B2021-088 moved this if/else from CreatePDF() so that the Approval logic will have access to this logic
ProcedureInfo MyProcedure = myItem as ProcedureInfo;
if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
else
MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
myItem = MyProcedure;
Prefix = prefix;
OpenPDF = openPDF;
DidAll = didAll;