débug comparaison de l'adresse de livraison
This commit is contained in:
14
main.py
14
main.py
@@ -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:
|
||||
|
Reference in New Issue
Block a user