From f5755c77f0b82ce7c6e9aa9b052bbc5f7f6bc295 Mon Sep 17 00:00:00 2001 From: Ambulance Clerc Date: Thu, 2 Jun 2022 15:01:10 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9bug=20HRF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 3ae9f58..278a797 100644 --- a/main.py +++ b/main.py @@ -19,7 +19,7 @@ from threading import * from class_invoices import * from class_addresses import * -VERSION = "202200530 - 1556" +VERSION = "202200602 - 1500" #test master 2 src_dir = os.getenv('APPDATA') + "\Attrib2Biz\src" @@ -469,18 +469,20 @@ class ClercAttrib2Biz(): #self.draw_test(item_1=data.Patient, item_2=addresses_exist) #messagebox.showerror(title="AVS Trouvé", message=f"Le code AVS de l'adresse {data.Patient['insurance_policy_number']} est déjà existant: [{data.Debtor['code']}], merci de le corriger ") - b_HRF = False sHRF = "" - - for article in data.Articles: + if "code" in article.keys(): if article["code"] == "HRF": b_HRF = True sHRF = article["line_1"].replace("h", ":") - print(f"pass HRF => {data.Patient['fip_number']}") + print(f"pass HRF => {data.Patient['fip_number']} = {b_HRF}") break + + + + for article in data.Articles: self.bs_counter += 1 csv_col = cls_Col(True) @@ -639,8 +641,10 @@ class ClercAttrib2Biz(): "%d.%m.%Y") # Date PEC csv_col.data[111] += " - " + datetime.strptime(data.Intervention["start_time"], "%Y-%m-%dT%H:%M:%S%z").strftime( "%H:%M") # Heure START PEC + print(f"{data.Patient['fip_number']} HRF:{b_HRF}") if b_HRF: csv_col.data[111] += "-" + sHRF + print(f"DEBUG HRF: {sHRF}") else: csv_col.data[111] += "-" + datetime.strptime(data.Intervention["end_time"], "%Y-%m-%dT%H:%M:%S%z").strftime( "%H:%M") # Heure END PEC