From 17a9078bda033cdad9dd21d78828a4d45246fabb Mon Sep 17 00:00:00 2001 From: t0is Date: Wed, 2 Apr 2025 07:48:57 +0200 Subject: [PATCH] edits --- gpc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gpc.py b/gpc.py index 712657f..487d63a 100644 --- a/gpc.py +++ b/gpc.py @@ -70,9 +70,10 @@ class Data(BaseRecord): self.date = date.strftime("%d%m%y") def to_string(self): - print(f"{self.record_type.value}") - print(f"{self.account}") - print(f"{self.payer_account}") + print(f"{self.record_type.value:03}") + print(f"{str(self.account)[:16].zfill(16)}") + print(f"{str(self.payer_account).rjust(16, '0')[:16]}") + print(f"{str(self.payer_account).rjust(16, '0')[:16]}") return (f"{self.record_type.value:03}{str(self.account)[:16].zfill(16)}{str(self.payer_account).rjust(16, '0')[:16]}" f"{str(self.no)[:13].zfill(13)}{int(self.balance):012}{self.code.value:1}{self.variable:010}"