Detect missing ASINs
parent
08513850e5
commit
3b9b5fce79
|
|
@ -53,7 +53,7 @@ DECIMAL_FORMAT = decimal.Decimal("0.01")
|
|||
|
||||
UOM_MAP = {
|
||||
"BX": "Box",
|
||||
"CS": "Case",
|
||||
"CA": "Case",
|
||||
"EA": "Each",
|
||||
"GM": "Gram",
|
||||
"RL": "Roll",
|
||||
|
|
@ -354,7 +354,7 @@ def convert(file_path: pathlib.Path, database):
|
|||
sscc_check(sscc)
|
||||
elif fields[0] == 'LIN':
|
||||
package.sku = fields[3]
|
||||
package.asin = fields[3]
|
||||
package.asin = ''
|
||||
elif fields[0] == 'SN1':
|
||||
package.qty = fields[2]
|
||||
package.uom = fields[3]
|
||||
|
|
@ -416,6 +416,8 @@ def convert(file_path: pathlib.Path, database):
|
|||
asn_file.print_row('TAR',pallet.pallet_sscc)
|
||||
for package in pallet.package_list:
|
||||
line_info = get_line_information(database, record.sohnum, package.sku, package.lot)
|
||||
if line_info['XX4S_LUDF3_0'].strip() == '':
|
||||
pprint.pprint(f'Blank ASIN detected: Shipment:{record.shipment_id} PO:{record.p_o} Item:{package.sku} {package.package_sscc}')
|
||||
asn_file.print_row(
|
||||
"PKG",
|
||||
package.package_sscc,
|
||||
|
|
@ -435,7 +437,7 @@ def convert(file_path: pathlib.Path, database):
|
|||
package.lot,
|
||||
line_info['ITMDES1_0'],#package.description,
|
||||
str(package.qty),
|
||||
line_info['SAU_0'],#package.uom,#TODO spell out Case from CS
|
||||
UOM_MAP[line_info['SAU_0']],#package.uom,#TODO spell out Case from CS
|
||||
str(line_info['SHL_0']),#str(package.shelf_life),
|
||||
line_info['SHLUOM'],#package.shelf_life_uom,
|
||||
package.expiration_date_str,
|
||||
|
|
|
|||
Loading…
Reference in New Issue