diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs index a937bde9..b9c96d5c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs @@ -459,6 +459,17 @@ namespace VEPROMS.CSLA.Library if (pi == null) return ""; + // B2023-035 for save the current select child (selectedSlave) and use the child number + // that was selected when printed. This is needed for when "Other" applicability + // values are referenced. For BNPP Alarms, sometimes the SelectedSlave value was set + // to the corresponding "Other" value, but we needed to use the selected child that was + // selected from the print button/menu in order to get the correct "Other" value. + int docVerSelectedSlave = DocVersionConfig.SelectedSlave; + int procInfoSelectedChildToPrint = pi.SelectedChildToPrint; + if (procInfoSelectedChildToPrint != 0) + { + DocVersionConfig.SelectedSlave = procInfoSelectedChildToPrint; + } string unitdes = "ID"; string prefix = null; string fromunitdes = null; @@ -506,7 +517,9 @@ namespace VEPROMS.CSLA.Library fromunitdes = DocVersionConfig.Other_Unit_ID; else fromunitdes = DocVersionConfig.Unit_ID; - + + DocVersionConfig.SelectedSlave = docVerSelectedSlave; //B2023-035 reset the selected Slave + // adjustments to the procedure number for applicability can be defined in 2 places: // 1) mstr below: working draft properties/Applicability/Procedure number field for each unit can have text. The '#' in this // field represents the procdure number & any text prefixing it, will be used to prefix the procedure number