débug comparaison de l'adresse de livraison

This commit is contained in:
Ambulance Clerc
2023-06-20 15:02:52 +02:00
parent 4387a1d00b
commit eb0e4b4429
3 changed files with 9 additions and 9 deletions

View File

@@ -1 +1 @@
20230620-1453
20230620-1502

14
main.py
View File

@@ -399,22 +399,22 @@ class ClercAttrib2Biz():
def compare_old_and_new_adresses(self, new, old, code):
if new['insurance_policy_number'].replace('.','') != old.AVS:
if self.ifNotNull(new['insurance_policy_number']).replace('.','') != old.AVS:
print("compare adresse exit avs")
return False
if new['lastname'].replace('.','') != old.lastName:
if self.ifNotNull(new['lastname']).replace('.','') != old.lastName:
print("compare adresse exit lastname")
return False
if new['firstname'].replace('.','') != old.firstName:
if self.ifNotNull(new['firstname']).replace('.','') != old.firstName:
print("compare adresse exit firstname")
return False
if datetime.strptime(new['birthdate'], "%Y-%m-%d").strftime("%d.%m.%Y") != old.birth:
if datetime.strptime(self.ifNotNull(new['birthdate']), "%Y-%m-%d").strftime("%d.%m.%Y") != old.birth:
print("compare adresse exit date")
return False
if f"{new['street'].strip()} {new['street_number'].strip()}" != f"{old.street.strip()}":
print(f"compare adresse exit ({new['street'].strip()} {new['street_number'].strip()}) != [" + old.street.strip()+"]")
if f"{self.ifNotNull(new['street']).strip()} {self.ifNotNull(new['street_number']).strip()}" != f"{self.ifNotNull(old.street).strip()}":
print(f"compare adresse exit ({self.ifNotNull(new['street']).strip()} {self.ifNotNull(new['street_number']).strip()}) != [" + self.ifNotNull(old.street).strip()+"]")
return False
if f"{new['postal_code']} {new['city']}" != f"{old.npa} {old.city}":
if f"{self.ifNotNull(new['postal_code'])} {self.ifNotNull(new['city'])}" != f"{self.ifNotNull(old.npa)} {self.ifNotNull(old.city)}":
print("compare adresse exit city")
return False
if new["addr_2"] != old.addr_2 and int(code) < 100:

View File

@@ -1 +1 @@
VERSION = "20230620-1453"
VERSION = "20230620-1502"