Compare commits
12 Commits
addresses
...
202200606-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a0ab15e7d | ||
|
|
e92d92deec | ||
|
|
0f5fbe6778 | ||
|
|
b678c85400 | ||
|
|
521db9851e | ||
|
|
9acdf7a0f5 | ||
|
|
2a42096dcb | ||
|
|
8ee93aefb0 | ||
|
|
f5755c77f0 | ||
|
|
f569dee4c2 | ||
|
|
71f736fd83 | ||
|
|
3567b6942f |
36
main.py
36
main.py
@@ -19,7 +19,7 @@ from threading import *
|
||||
from class_invoices import *
|
||||
from class_addresses import *
|
||||
|
||||
VERSION = "202200522 - 1848"
|
||||
VERSION = "202200602 - 1700"
|
||||
#test master 2
|
||||
|
||||
src_dir = os.getenv('APPDATA') + "\Attrib2Biz\src"
|
||||
@@ -469,18 +469,21 @@ 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}")
|
||||
#self.logger.warning(f"HRF: {data.data['id']}")
|
||||
break
|
||||
|
||||
|
||||
|
||||
for article in data.Articles:
|
||||
self.bs_counter += 1
|
||||
csv_col = cls_Col(True)
|
||||
|
||||
@@ -492,16 +495,21 @@ class ClercAttrib2Biz():
|
||||
csv_col.data[10] = "<AUTO>" # Compte collectif du tiers = <AUTO>
|
||||
|
||||
|
||||
if "destination_name" not in data.Intervention.keys() or data.Intervention["destination_name"] == None:
|
||||
if "without_transportation" in data.Intervention.keys() and data.Intervention["without_transportation"] == True:
|
||||
csv_col.data[15] = "Sans transport"
|
||||
print(f"->NO DEST** {data.data['id']}")
|
||||
elif data.Intervention["destination_name"] == None and data.Intervention["destination_street"] == None and data.Intervention["destination_city"] == None:
|
||||
csv_col.data[15] = "Sans destination"
|
||||
print(f"->NO DEST sans destination transmis à autruit** {data.data['id']}")
|
||||
else:
|
||||
con = ""
|
||||
concat_str = ""
|
||||
if data.Intervention["destination_name"] is not None:
|
||||
concat_str += con + data.Intervention["destination_name"]
|
||||
con = ", "
|
||||
concat_str += con + data.Intervention["destination_street"] + " " + self.ifNotNull(data.Intervention["destination_street_number"])
|
||||
con = ", "
|
||||
if data.Intervention["destination_street"] is not None:
|
||||
concat_str += con + data.Intervention["destination_street"] + " " + self.ifNotNull(data.Intervention["destination_street_number"])
|
||||
con = ", "
|
||||
concat_str += con + data.Intervention["destination_postal_code"] + " " + data.Intervention["destination_city"]
|
||||
csv_col.data[15] = concat_str # Adresse DEST
|
||||
|
||||
@@ -510,8 +518,9 @@ class ClercAttrib2Biz():
|
||||
if data.Intervention["site_name"] is not None:
|
||||
concat_str += con + data.Intervention["site_name"]
|
||||
con = ", "
|
||||
concat_str += con + self.ifNotNull(data.Intervention["site_street"]) + " " + self.ifNotNull(data.Intervention["site_street_number"])
|
||||
con = ", "
|
||||
if data.Intervention["site_street"] is not None:
|
||||
concat_str += con + self.ifNotNull(data.Intervention["site_street"]) + " " + self.ifNotNull(data.Intervention["site_street_number"])
|
||||
con = ", "
|
||||
concat_str += con + self.ifNotNull(data.Intervention["site_postal_code"]) + " " + self.ifNotNull(data.Intervention["site_city"])
|
||||
csv_col.data[18] = concat_str # Adresse PEC
|
||||
print(f'debug id:{data.data["id"]} code: {data.Debtor["code"]}')
|
||||
@@ -628,7 +637,7 @@ class ClercAttrib2Biz():
|
||||
|
||||
csv_col.data[115] = self.ifNotNull(data.Patient["lastname"]) + " " + self.ifNotNull(data.Patient["firstname"])
|
||||
csv_col.data[108] = data.Patient["complement"]
|
||||
csv_col.data[109] = datetime.strptime(data.Patient["birthdate"], "%Y-%m-%d").strftime("%d.%m.%Y") if data.Patient["birthdate"] is not None else "date naissance inconnue"
|
||||
csv_col.data[109] = datetime.strptime(data.Patient["birthdate"], "%Y-%m-%d").strftime("%d.%m.%Y") if data.Patient["birthdate"] is not None else ""
|
||||
if data.Patient["insurance_policy_number"] is not None and '-' not in data.Patient["insurance_policy_number"]:
|
||||
csv_col.data[109] += ", " + data.Patient["insurance_policy_number"]
|
||||
|
||||
@@ -637,6 +646,7 @@ 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
|
||||
|
||||
if b_HRF:
|
||||
csv_col.data[111] += "-" + sHRF
|
||||
else:
|
||||
@@ -651,6 +661,7 @@ class ClercAttrib2Biz():
|
||||
csv_col.data[107] = data.Patient["fip_number"]
|
||||
csv_col.data[107] += " - " + data.data["comments"] if data.data["comments"] is not None else ""
|
||||
csv_col.data[116] = self.ifNotNull(data.Patient["category"]) + " - " + self.ifNotNull(data.Intervention["type"])
|
||||
csv_col.data[118] = data.Intervention["kilometers"]
|
||||
csv_col.data[135] = data.Intervention["base_name"]
|
||||
csv_col.data[136] = 2 if data.Intervention["base_name"] == "Uvrier" else 3
|
||||
csv_col.data[146] = csv_col.data[136]
|
||||
@@ -728,7 +739,7 @@ class ClercAttrib2Biz():
|
||||
if data.Patient["complement"] != None :
|
||||
self.a_listings["to_check"].append(data.Patient["fip_number"])
|
||||
print(data.Patient["complement"])
|
||||
self.logger.warning(f"Complément patient: facture N°: {data.data['id']} / {data.Patient['fip_number']}")
|
||||
self.logger.warning(f"Complément 22 patient: facture N°: {data.data['id']} / {data.Patient['fip_number']}")
|
||||
|
||||
|
||||
if data.Patient['insurance_policy_number'] == None:
|
||||
@@ -744,6 +755,7 @@ class ClercAttrib2Biz():
|
||||
b_HRF = True
|
||||
sHRF = article["line_1"].replace("h",":")
|
||||
print(f"pass HRF => {data.Patient['fip_number']}")
|
||||
|
||||
break
|
||||
|
||||
|
||||
|
||||
1
main_version
Normal file
1
main_version
Normal file
@@ -0,0 +1 @@
|
||||
202200606 - 1107
|
||||
Reference in New Issue
Block a user