B2022-114: ROs are not printing in Word document sections

This commit is contained in:
Kathy Ruffing 2022-09-15 12:33:31 +00:00
parent 9b65876cb0
commit 1d0dee974c

View File

@ -41,7 +41,16 @@ namespace VEPROMS.CSLA.Library
// Remove any spaces due to split and if `_` found change it to space.
public static string ToCleanString(this string str)
=> str.Replace(" ", string.Empty)
.Replace('_', ' ');
{
string retval = str;
// B2022-114: ROs not printing in Word docs. spaces were removed, but this should only happen in unit designators such
// as <U-OTHER NAME>. Keep the code that replaces the '_' with a space.
if (retval.ToUpper().StartsWith("<U-"))
{
retval = retval.Replace(" ", string.Empty);
}
retval = retval.Replace('_', ' ');
return retval;
}
}
}