fix: use raw code without zero-padding, matching kyofilter_E behaviour
This commit is contained in:
+2
-5
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""CUPS filter for TA 3505ci - injects department account code into PostScript stream."""
|
||||
"""CUPS filter for TA 3505ci - injects department code into PostScript stream."""
|
||||
import sys
|
||||
|
||||
|
||||
@@ -21,10 +21,7 @@ def get_account_code(options):
|
||||
code = km[2:]
|
||||
if not code.isdigit():
|
||||
return None
|
||||
if len(code) > 8:
|
||||
sys.stderr.write(f"kyofilter: WARNING: department code '{code}' exceeds 8 digits, ignored\n")
|
||||
return None
|
||||
return code.zfill(8)
|
||||
return code # raw digits, no zero-padding — matches kyofilter_E behaviour
|
||||
|
||||
|
||||
def process_stream(lines, account_code):
|
||||
|
||||
Reference in New Issue
Block a user