diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 4fbe1a06..b0bd263b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -2245,6 +2245,24 @@ namespace VEPROMS.CSLA.Library #endregion #region Change Bar public bool HasChangeBar + { + get + { + bool chg = HasChanges; + StepInfo si = this as StepInfo; + if (si == null) return false; + StepConfig sc = si.MyConfig as StepConfig; + if (sc == null) return false; + // if there is no override & return whether there was a change to the text. + if (chg && ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds && + (sc.Step_ChangeID ?? "") == "") + return false; // No Change ID - No Change Bar + if (sc.Step_CBOverride == null) + return chg; + return (sc.Step_CBOverride == "On"); + } + } + public bool HasChanges { get { @@ -2254,10 +2272,7 @@ namespace VEPROMS.CSLA.Library StepConfig sc = si.MyConfig as StepConfig; if (sc == null) return false; // if there is no override & return whether there was a change to the text. - if (sc.Step_CBOverride == null) - return (MyContent.DTS > MyProcedure.ChangeBarDate); - else // override is on: - return (sc.Step_CBOverride == "On"); + return (MyContent.DTS > MyProcedure.ChangeBarDate); } } #endregion