Test for SSCC length, needs to be 20.
parent
42ab26abbf
commit
08513850e5
|
|
@ -91,6 +91,9 @@ STASH_GS1 = '0776520'
|
||||||
|
|
||||||
|
|
||||||
def sscc_check(sscc):#TODO recurse through pallets and packages
|
def sscc_check(sscc):#TODO recurse through pallets and packages
|
||||||
|
if len(sscc) != 20:
|
||||||
|
pprint.pprint(f'{sscc} is not the correct length of an SSCC (20)')
|
||||||
|
else:
|
||||||
stashtea_gs1 = '0776520'
|
stashtea_gs1 = '0776520'
|
||||||
application_id = sscc[:2]
|
application_id = sscc[:2]
|
||||||
extension = sscc[2]
|
extension = sscc[2]
|
||||||
|
|
@ -250,6 +253,7 @@ def main():
|
||||||
ASN_DIRECTORY.mkdir(parents=True, exist_ok=True)
|
ASN_DIRECTORY.mkdir(parents=True, exist_ok=True)
|
||||||
with yamamotoyama.get_connection() as database:
|
with yamamotoyama.get_connection() as database:
|
||||||
for file_path in ASN_DIRECTORY.glob(SOURCE_FILENAME_GLOB):
|
for file_path in ASN_DIRECTORY.glob(SOURCE_FILENAME_GLOB):
|
||||||
|
pprint.pprint(file_path)
|
||||||
convert(file_path, database)
|
convert(file_path, database)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue