Get new COC when re-shipping

This commit is contained in:
Chase Tucker
2025-02-20 08:13:44 -07:00
committed by Tucker Chase (CSC FI SPS MESLEO)
parent 62ac326550
commit 924a208264
4 changed files with 36 additions and 9 deletions

View File

@ -316,11 +316,21 @@ SAPCreate:
END
Retransmit = False$
Reship = False$
If ShipNo EQ '' then
ShipNo = NextKey('COC')
end else
Logging_Services('AppendLog', objLog, LoggingDTM : @FM : WONo : @FM: ShipNo : @FM : 'Prior shipment number found', @RM, @FM, '')
Retransmit = True$
OrigShipRec = Database_Services('ReadDataRow', 'COC', ShipNo)
If OrigShipRec NE '' then
OrigSAPDeliveryNo = OrigShipRec<COC_SAP_DEL_NO$>
If OrigSAPDeliveryNo _EQC SAPDeliveryNo then
Logging_Services('AppendLog', objLog, LoggingDTM : @FM : WONo : @FM: ShipNo : @FM : 'Prior shipment number found', @RM, @FM, '')
Retransmit = True$
end else
ShipNo = NextKey('COC')
Reship = True$
end
end
end
//---------------------------------------------------------------------------------------------------
@ -332,7 +342,6 @@ SAPCreate:
ShipRec = ''
If Retransmit EQ True$ then
// Do not overwrite the original ship date if we are simply retransmitting the COC file.
OrigShipRec = Database_Services('ReadDataRow', 'COC', ShipNo)
OrigShipDt = OrigShipRec<COC_SHIP_DT$>
OrigEntryDt = OrigShipRec<COC_ENTRY_DATE$>
If OrigShipDt NE '' then
@ -373,17 +382,17 @@ SAPCreate:
ShipRec<COC_RDS_NO$,N> = ShipRDS
ShipRec<COC_WO_STEP$,N> = ShipWOStep
obj_WO_Mat('AddShip',WONo:'*':CassNo:@RM:ShipNo) ;* Adds ShipNo to WO_MAT record
obj_WO_Mat('AddShip',WONo:'*':CassNo:@RM:ShipNo:@RM:Reship) ;* Adds ShipNo to WO_MAT record
wmlWONos<1,N> = WONo
wmlCassNos<1,N> = CassNo
IF ReactType = 'P' OR ReactType = 'EPP' THEN
WMOutKey = XLATE('WO_MAT',WONo:'*':CassNo,WO_MAT_WMO_KEY$,'X')
obj_WM_Out('AddShip',WMOutKey:@RM:ShipNo)
obj_WM_Out('AddShip',WMOutKey:@RM:ShipNo:@RM:Reship)
wmlCassIDs<1,N> = 'O':WONo:'.':ShipWOStep:'.':CassNo
END ELSE
obj_RDS('AddShip', ShipNo : @RM : ShipRDS : @RM : Oconv(ShipRec<COC_ENTRY_DATE$>, 'D4/') : @RM : Oconv(Time(), 'MTH')) ; // Adds ship data to the RDS row. dmb 01/02/2018
obj_RDS('AddShip', ShipNo : @RM : ShipRDS : @RM : Oconv(ShipRec<COC_ENTRY_DATE$>, 'D4/') : @RM : Oconv(Time(), 'MTH'):@RM:Reship) ; // Adds ship data to the RDS row. dmb 01/02/2018
wmlCassIDs<1,N> = ShipRDS
END
@ -2226,3 +2235,4 @@ RETURN