diff --git a/LSL2/STPROC/RDS_SERVICES.txt b/LSL2/STPROC/RDS_SERVICES.txt index c59019f..bfc1c0e 100644 --- a/LSL2/STPROC/RDS_SERVICES.txt +++ b/LSL2/STPROC/RDS_SERVICES.txt @@ -752,32 +752,28 @@ end service Service IsValidSubLot(RDSNo, RDSType, SupplierLot) - + + // Note: We need to use the Quote function before comparing values because OpenInsight + // fails to compare strings that start with numbers. IsValid = False$ - rec = '' Begin Case Case RDSType EQ 'SIC' - compareLot = XLATE('RDS', RDSNo, RDS_LOT_NUM$, 'X') - if compareLot EQ SupplierLot then - IsValid = True$ - end + CompareLot = Xlate('RDS', RDSNo, RDS_LOT_NUM$, 'X') + If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$ Case RDSType EQ 'EPP' - CONVERT '.' TO '*' IN RDSNo - compareLot = XLATE('WM_IN', RDSNo, 'LOT_NO', 'X') - if compareLot EQ SupplierLot then - IsValid = True$ - end + Convert '.' to '*' in RDSNo + CompareLot = Xlate('WM_IN', RDSNo, 'LOT_NO', 'X') + If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$ Case RDSType EQ 'GAN' - CONVERT '.' TO '*' IN RDSNo - compareLot = XLATE('WO_MAT', RDSNo, WO_MAT_LOT_NO$, 'X') - if compareLot EQ SupplierLot then - IsValid = True$ - end + Convert '.' to '*' in RDSNo + CompareLot = Xlate('WO_MAT', RDSNo, WO_MAT_LOT_NO$, 'X') + If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$ - End Case + End Case + Response = IsValid end service @@ -3390,5 +3386,3 @@ ClearCursors: return - -