Seal number and X3 PO number added.
parent
7af3cb1f81
commit
fcadb8db39
18
edi_943.py
18
edi_943.py
|
@ -233,6 +233,7 @@ def get_shipment(
|
|||
,[SALFCY]
|
||||
,[SOHNUM_0]
|
||||
,[CUSORDREF_0]
|
||||
,[SO_CUSORDREF_0]
|
||||
,[BPCORD_0]
|
||||
,[BPDNAM_0]
|
||||
,[BPDADDLIG_0]
|
||||
|
@ -267,6 +268,7 @@ def get_shipment(
|
|||
,[GROWEI_0]
|
||||
,[CFMFLG_0]
|
||||
,[SHIDAT_0]
|
||||
,[TRLLICPLATE_0]
|
||||
from [PROD].[zyumiddleware_shipment_shandex] as [SDH]
|
||||
where
|
||||
[SDH].[SDHNUM_0] = :shipment
|
||||
|
@ -289,6 +291,7 @@ class ShipmentHeader(X12):
|
|||
salfcy: str
|
||||
sohnum: str
|
||||
cusordref: str
|
||||
so_cusordref: str
|
||||
bpcord: str
|
||||
bpdnam: str
|
||||
bpdaddlig: str
|
||||
|
@ -313,6 +316,7 @@ class ShipmentHeader(X12):
|
|||
interchange_control_number: str
|
||||
header_segments: int
|
||||
footer_segments: int
|
||||
seal_number: str
|
||||
|
||||
def __init__(self, database_row: records.Record):
|
||||
self.sdhnum = database_row.SDHNUM_0
|
||||
|
@ -322,6 +326,7 @@ class ShipmentHeader(X12):
|
|||
self.salfcy = database_row.SALFCY_0
|
||||
self.sohnum = database_row.SOHNUM_0
|
||||
self.cusordref = database_row.CUSORDREF_0
|
||||
self.so_cusordref = database_row.SO_CUSORDREF_0
|
||||
self.bpcord = database_row.BPCORD_0
|
||||
self.bpdnam = database_row.BPDNAM_0
|
||||
self.bpdaddlig = database_row.BPDADDLIG_0
|
||||
|
@ -343,6 +348,7 @@ class ShipmentHeader(X12):
|
|||
self.upddat = database_row.UPDDAT_0
|
||||
self.cce = database_row.CCE_0
|
||||
self.shidat = database_row.SHIDAT_0
|
||||
self.seal_number = database_row.TRLLICPLATE_0
|
||||
raw_control_number = self.control_number()
|
||||
self.short_control_number = f"{raw_control_number:04}"
|
||||
self.interchange_control_number = (
|
||||
|
@ -352,8 +358,9 @@ class ShipmentHeader(X12):
|
|||
self.date = self.now.strftime("%y%m%d")
|
||||
self.long_date = self.now.strftime("%Y%m%d")
|
||||
self.time = self.now.strftime("%H%m")
|
||||
self.header_segments = 10
|
||||
self.header_segments = 11
|
||||
self.footer_segments = 2
|
||||
|
||||
|
||||
def x12(self, receiver_id, mdl) -> str:
|
||||
return "".join(
|
||||
|
@ -393,7 +400,7 @@ class ShipmentHeader(X12):
|
|||
self.shidat.strftime("%Y%m%d"),
|
||||
self.sdhnum,
|
||||
"",
|
||||
"",
|
||||
self.so_cusordref,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
@ -434,6 +441,13 @@ class ShipmentHeader(X12):
|
|||
self.cusordref,
|
||||
]
|
||||
),
|
||||
self.line(
|
||||
[
|
||||
"N9",
|
||||
"SN",
|
||||
self.seal_number,
|
||||
]
|
||||
),
|
||||
self.line(
|
||||
[
|
||||
"G62",
|
||||
|
|
Loading…
Reference in New Issue