Handle 944s for unsent 943s with email notification.
parent
018dd5c13b
commit
fe5d2968f4
|
@ -90,16 +90,22 @@ def determine_edi_action(edi_filename: pathlib.Path):
|
|||
transaction = ''
|
||||
for fields in tokens_from_edi_file(edi_filename):
|
||||
if fields[0] == "W17":
|
||||
transaction = fields[5]
|
||||
break
|
||||
pprint.pprint(transaction)
|
||||
if len(fields) == 6:
|
||||
transaction = fields[5]
|
||||
break
|
||||
elif len(fields) == 5:
|
||||
transaction = fields[4]
|
||||
break
|
||||
|
||||
if transaction:
|
||||
if transaction.startswith('SHP'):
|
||||
process_intersite_receipt(edi_filename)
|
||||
elif transaction.startswith('RA'):
|
||||
process_return(edi_filename)
|
||||
# elif transaction.startswith('RA*'):#TODO how are coman pos received
|
||||
# pprint.pprint('return')
|
||||
# PO is used when Shandex does not receive a 943, will they receive 943s for comans?
|
||||
elif transaction.startswith('PO'):#TODO how are coman pos received
|
||||
simple_email_notification.email_noticication(['bleeson@stashtea.com'],
|
||||
'Unknown Shandex 944',[transaction])
|
||||
else:
|
||||
raise Exception('Unknown transaction type')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue