Débug check adress
This commit is contained in:
@@ -1 +1 @@
|
||||
20220705-1341
|
||||
20220705-1607
|
19
main.py
19
main.py
@@ -353,6 +353,23 @@ class ClercAttrib2Biz():
|
||||
|
||||
return ret
|
||||
|
||||
def compare_old_and_new_adresses(self, new, old):
|
||||
|
||||
if new['insurance_policy_number'].replace('.','') != old.AVS:
|
||||
return False
|
||||
if new['lastname'].replace('.','') != old.lastName:
|
||||
return False
|
||||
if new['firstname'].replace('.','') != old.firstName:
|
||||
return False
|
||||
if datetime.strptime(new['birthdate'], "%Y-%m-%d").strftime("%d.%m.%Y") != old.birth:
|
||||
return False
|
||||
if f"{new['street']} {new['street_number']}" != old.street:
|
||||
return False
|
||||
if f"{new['postal_code']} {new['city']}" != f"{old.npa} {old.city}":
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def parseFile(self, data, filename):
|
||||
self.index_counter += 1
|
||||
@@ -436,7 +453,7 @@ class ClercAttrib2Biz():
|
||||
|
||||
if self.check_addresses.get():
|
||||
addresses_exist = self.addresses.get_item_by_AVS(data.Patient['insurance_policy_number'].replace(".", ""))
|
||||
if addresses_exist is not None:
|
||||
if addresses_exist is not None and not self.compare_old_and_new_adresses(new=data.Patient, old=addresses_exist):
|
||||
popup = Check_addresses_popup(self.fenetre, item_1=data.Patient, item_2=addresses_exist, debitor=data.Debtor, factureID=data.data['id'])
|
||||
b_address_update = popup.show()
|
||||
print(f"Result Popup: {b_address_update}")
|
||||
|
@@ -1 +1 @@
|
||||
VERSION = "20220705-1341"
|
||||
VERSION = "20220705-1607"
|
Reference in New Issue
Block a user