Refactoring code for modular approach

This commit is contained in:
2025-09-12 21:37:08 +02:00
parent 12e0d64484
commit c7d6b33cd5
15 changed files with 1419 additions and 184 deletions

View File

@@ -54,9 +54,9 @@ class GTINProcessor:
return gtin_clean[-13:]
elif 0 < length < 8:
# Too short - pad to UPC-A
# Too short - pad to EAN-13
logger.warning(f"GTIN too short, padding: {gtin_clean}")
return gtin_clean.zfill(12)
return gtin_clean.zfill(13)
logger.warning(f"Invalid GTIN format: '{gtin_value}'")
return None