débug numéro de rue avec un - avec hack excel
This commit is contained in:
BIN
convert.xlsm
BIN
convert.xlsm
Binary file not shown.
21
main.py
21
main.py
@@ -369,7 +369,12 @@ class ClercAttrib2Biz():
|
|||||||
x = 0
|
x = 0
|
||||||
|
|
||||||
if self.export_one_file.get() and os.path.exists(os.path.join(dest_dir, f"src.csv")):
|
if self.export_one_file.get() and os.path.exists(os.path.join(dest_dir, f"src.csv")):
|
||||||
os.remove(os.path.join(dest_dir, f"src.csv"))
|
try:
|
||||||
|
os.remove(os.path.join(dest_dir, f"src.csv"))
|
||||||
|
except:
|
||||||
|
messagebox.showerror(title="Erreur fichier déjà ouvert", message=f"Le fichier src.csv est déjà ouvert. Veuillez le fermer et recommencer")
|
||||||
|
return
|
||||||
|
|
||||||
print(f"remove src.csv => {os.path.join(dest_dir, 'src.csv')}")
|
print(f"remove src.csv => {os.path.join(dest_dir, 'src.csv')}")
|
||||||
|
|
||||||
|
|
||||||
@@ -620,6 +625,13 @@ class ClercAttrib2Biz():
|
|||||||
if data.Patient[elem] == None:
|
if data.Patient[elem] == None:
|
||||||
data.Patient[elem] = "Patient inconnu"
|
data.Patient[elem] = "Patient inconnu"
|
||||||
|
|
||||||
|
if elem == "street_number":
|
||||||
|
print(f"street_number = {data.Patient[elem]}")
|
||||||
|
if data.Patient[elem] != None and "-" in data.Patient[elem] and "\t" not in data.Patient[elem]:
|
||||||
|
data.Patient[elem] = f"\t{data.Patient[elem]}"
|
||||||
|
print("FOUND Patient")
|
||||||
|
|
||||||
|
|
||||||
self.addToIndexs(obj=csv_col, data=data.Patient[elem], cat="patient", key=elem)
|
self.addToIndexs(obj=csv_col, data=data.Patient[elem], cat="patient", key=elem)
|
||||||
|
|
||||||
for elem in data.Debtor:
|
for elem in data.Debtor:
|
||||||
@@ -627,8 +639,15 @@ class ClercAttrib2Biz():
|
|||||||
#print(f"{data.Patient['fip_number']} => {data.Debtor['name']}")
|
#print(f"{data.Patient['fip_number']} => {data.Debtor['name']}")
|
||||||
data.Debtor["code"] = get_debitor_code(data.Debtor["name"])
|
data.Debtor["code"] = get_debitor_code(data.Debtor["name"])
|
||||||
|
|
||||||
|
if elem == "street_number":
|
||||||
|
print(f"street_number = {data.Patient[elem]}")
|
||||||
|
if data.Patient[elem] != None and "-" in data.Patient[elem] and "\t" not in data.Patient[elem]:
|
||||||
|
data.Patient[elem] = f"\t{data.Patient[elem]}"
|
||||||
|
print("FOUND DEB")
|
||||||
|
|
||||||
if elem != "name":
|
if elem != "name":
|
||||||
csv_col.data.append(data.Debtor[elem])
|
csv_col.data.append(data.Debtor[elem])
|
||||||
|
|
||||||
if "name" in data.Debtor.keys():
|
if "name" in data.Debtor.keys():
|
||||||
csv_col.data.append(data.Debtor["name"])
|
csv_col.data.append(data.Debtor["name"])
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user