From 1b66076b9c5ea4388e2e3fdb114bf28b2939994d Mon Sep 17 00:00:00 2001 From: t0is Date: Wed, 2 Apr 2025 07:51:37 +0200 Subject: [PATCH] edits --- gpc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpc.py b/gpc.py index 487d63a..f248f03 100644 --- a/gpc.py +++ b/gpc.py @@ -70,12 +70,12 @@ class Data(BaseRecord): self.date = date.strftime("%d%m%y") def to_string(self): - print(f"{self.record_type.value:03}") + print(f"{int(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]}" + return (f"{int(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}" f"{self.constant_symbol:010}{self.specific_symbol:010}" f"{'0'*6}{str(self.client_name)[:20].ljust(20)}{'0'}{self.currency}{self.date}\r\n")