débug comparaison HRF et suppression du break au moment du HRF
This commit is contained in:
@@ -1 +1 @@
|
|||||||
20230620-1559
|
20231031-1142
|
||||||
19
main.py
19
main.py
@@ -444,8 +444,10 @@ class ClercAttrib2Biz():
|
|||||||
|
|
||||||
cur_invoice_index = 0
|
cur_invoice_index = 0
|
||||||
|
|
||||||
|
total_facture_total = 0
|
||||||
|
total_facture_amount = 0
|
||||||
for ele in data["invoices"]:
|
for ele in data["invoices"]:
|
||||||
|
|
||||||
cur_invoice_index += 1
|
cur_invoice_index += 1
|
||||||
self.progress_bar["value"] = cur_invoice_index / self.count_facture * 100
|
self.progress_bar["value"] = cur_invoice_index / self.count_facture * 100
|
||||||
b_address_update = True
|
b_address_update = True
|
||||||
@@ -564,7 +566,7 @@ class ClercAttrib2Biz():
|
|||||||
b_address_update = popup.show()
|
b_address_update = popup.show()
|
||||||
mode_selected = "Attrib" if b_address_update else "Winbiz"
|
mode_selected = "Attrib" if b_address_update else "Winbiz"
|
||||||
self.logger.warning(
|
self.logger.warning(
|
||||||
f"Adresse connue donnée [{mode_selected}] conservé: : {data.data['id']} / {data.Patient['fip_number']} {data.Debtor['code']} {data.Debtor['lastname']} {data.Debtor['firstname']}")
|
f"Adresse connue données {mode_selected} conservées: {data.data['id']} / {data.Patient['fip_number']} {data.Debtor['code']} {data.Debtor['lastname']} {data.Debtor['firstname']}")
|
||||||
print(f"Result Popup: {b_address_update}")
|
print(f"Result Popup: {b_address_update}")
|
||||||
else:
|
else:
|
||||||
b_address_update = True
|
b_address_update = True
|
||||||
@@ -574,7 +576,11 @@ class ClercAttrib2Biz():
|
|||||||
|
|
||||||
b_HRF = False
|
b_HRF = False
|
||||||
sHRF = ""
|
sHRF = ""
|
||||||
|
|
||||||
|
facture_total = 0
|
||||||
for article in data.Articles:
|
for article in data.Articles:
|
||||||
|
if 'price' in article:
|
||||||
|
facture_total += float(article['price'])
|
||||||
|
|
||||||
if "code" in article.keys():
|
if "code" in article.keys():
|
||||||
if article["code"] == "HRF":
|
if article["code"] == "HRF":
|
||||||
@@ -582,9 +588,12 @@ class ClercAttrib2Biz():
|
|||||||
sHRF = article["line_1"].replace("h", ":")
|
sHRF = article["line_1"].replace("h", ":")
|
||||||
print(f"pass HRF => {data.Patient['fip_number']} = {b_HRF}")
|
print(f"pass HRF => {data.Patient['fip_number']} = {b_HRF}")
|
||||||
#self.logger.warning(f"HRF: {data.data['id']}")
|
#self.logger.warning(f"HRF: {data.data['id']}")
|
||||||
break
|
|
||||||
|
|
||||||
|
|
||||||
|
print(f"Lecture de la facture #{cur_invoice_index} {ele['id']} montant total = {ele['total_price']} <> {facture_total}")
|
||||||
|
if float(ele['total_price']) != facture_total:
|
||||||
|
print(f"ERROR NOT SAME PRICE")
|
||||||
|
total_facture_total += facture_total
|
||||||
|
total_facture_amount += float(ele['total_price'])
|
||||||
|
|
||||||
for article in data.Articles:
|
for article in data.Articles:
|
||||||
self.bs_counter += 1
|
self.bs_counter += 1
|
||||||
@@ -772,6 +781,8 @@ class ClercAttrib2Biz():
|
|||||||
|
|
||||||
lines.append(csv_col.data)
|
lines.append(csv_col.data)
|
||||||
csv_col = None
|
csv_col = None
|
||||||
|
|
||||||
|
print(f"total_facture_total = {total_facture_total} <> {total_facture_amount}")
|
||||||
if not self.export_one_file.get():
|
if not self.export_one_file.get():
|
||||||
with open(os.path.join(dest_dir, f"bizexdoc_" + filename.replace(".json", "") + ".csv"), "w+", errors='replace', newline='') as csv_file:
|
with open(os.path.join(dest_dir, f"bizexdoc_" + filename.replace(".json", "") + ".csv"), "w+", errors='replace', newline='') as csv_file:
|
||||||
wr = csv.writer(csv_file, delimiter=';')
|
wr = csv.writer(csv_file, delimiter=';')
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
VERSION = "20230620-1559"
|
VERSION = "20231031-1142"
|
||||||
Reference in New Issue
Block a user