Get new COC when re-shipping
This commit is contained in:
committed by
Tucker Chase (CSC FI SPS MESLEO)
parent
62ac326550
commit
924a208264
@ -1076,6 +1076,11 @@ AddShip:
|
||||
RdsNo = Parms[COL2()+1,@RM]
|
||||
ShipDt = Parms[COL2()+1,@RM]
|
||||
ShipTm = Parms[COL2()+1,@RM]
|
||||
Reship = Parms[COL2()+1,@RM]
|
||||
|
||||
If Reship EQ '' then
|
||||
Reship = False$
|
||||
end
|
||||
|
||||
IF NOT(ASSIGNED(RdsNo)) THEN ErrorMsg = 'Unassigned Parm "RdsNo" passed to routine. (':Method:')'
|
||||
IF NOT(ASSIGNED(ShipNo)) THEN ErrorMsg = 'Unassigned Parm "ShipNo" passed to routine. (':Method:')'
|
||||
@ -1108,7 +1113,7 @@ AddShip:
|
||||
|
||||
IF Get_Status(errCode) THEN RETURN ;* Problems getting the lock
|
||||
|
||||
IF RDSRec<RDS_SHIP_NO$> = '' OR RDSRec<RDS_SHIP_NO$> = ShipNo THEN
|
||||
IF RDSRec<RDS_SHIP_NO$> = '' OR RDSRec<RDS_SHIP_NO$> = ShipNo or Reship EQ True$ THEN
|
||||
RDSRec<RDS_SHIP_NO$> = ShipNo
|
||||
RDSRec<RDS_SHIP_DATE$> = thisShipDt
|
||||
RDSRec<RDS_SHIP_TIME$> = thisShipTm
|
||||
@ -1473,3 +1478,4 @@ CalcThickTarget:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
@ -316,11 +316,21 @@ SAPCreate:
|
||||
END
|
||||
|
||||
Retransmit = False$
|
||||
Reship = False$
|
||||
If ShipNo EQ '' then
|
||||
ShipNo = NextKey('COC')
|
||||
end else
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -958,6 +958,11 @@ AddShip:
|
||||
|
||||
WMOutKey = Parms[1,@RM]
|
||||
ShipNo = Parms[COL2()+1,@RM]
|
||||
Reship = Parms[COL2()+1,@RM]
|
||||
|
||||
If Reship EQ '' then
|
||||
Reship = False$
|
||||
end
|
||||
|
||||
IF NOT(ASSIGNED(WMOutKey)) THEN ErrorMsg = 'Unassigned Parm "WMOutKey" passed to routine. (':Method:')'
|
||||
IF NOT(ASSIGNED(ShipNo)) THEN ErrorMsg = 'Unassigned Parm "ShipNo" passed to routine. (':Method:')'
|
||||
@ -974,7 +979,7 @@ AddShip:
|
||||
|
||||
IF Get_Status(errCode) THEN RETURN ;* Problems getting the lock
|
||||
|
||||
IF WMOutRec<WM_OUT_SHIP_NO$> = '' OR WMOutRec<WM_OUT_SHIP_NO$> = ShipNo THEN
|
||||
IF WMOutRec<WM_OUT_SHIP_NO$> = '' OR WMOutRec<WM_OUT_SHIP_NO$> = ShipNo or Reship EQ True$ THEN
|
||||
|
||||
WMOutRec<WM_OUT_SHIP_NO$> = ShipNo
|
||||
|
||||
|
@ -3973,6 +3973,11 @@ AddShip:
|
||||
|
||||
WOMatKey = Parms[1,@RM]
|
||||
ShipNo = Parms[COL2()+1,@RM]
|
||||
Reship = Parms[COL2()+1,@RM]
|
||||
|
||||
If Reship EQ '' then
|
||||
Reship = False$
|
||||
end
|
||||
|
||||
IF NOT(ASSIGNED(WOMatKey)) THEN ErrorMsg = 'Unassigned Parm "WOMatKey" passed to routine. (':Method:')'
|
||||
IF NOT(ASSIGNED(ShipNo)) THEN ErrorMsg = 'Unassigned Parm "ShipNo" passed to routine. (':Method:')'
|
||||
@ -3989,7 +3994,7 @@ AddShip:
|
||||
|
||||
IF Get_Status(errCode) THEN RETURN ;* Problems getting the lock
|
||||
|
||||
IF WOMatRec<WO_MAT_SHIP_NO$> = '' THEN
|
||||
IF WOMatRec<WO_MAT_SHIP_NO$> = '' or Reship EQ True$ THEN
|
||||
WOMatRec<WO_MAT_SHIP_NO$> = ShipNo
|
||||
END ELSE
|
||||
END
|
||||
@ -5598,3 +5603,4 @@ ExpCOA:
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user