débug comparaison de l'adresse de livraison
This commit is contained in:
@@ -1 +1 @@
|
|||||||
20230620-1453
|
20230620-1502
|
||||||
14
main.py
14
main.py
@@ -399,22 +399,22 @@ class ClercAttrib2Biz():
|
|||||||
|
|
||||||
def compare_old_and_new_adresses(self, new, old, code):
|
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")
|
print("compare adresse exit avs")
|
||||||
return False
|
return False
|
||||||
if new['lastname'].replace('.','') != old.lastName:
|
if self.ifNotNull(new['lastname']).replace('.','') != old.lastName:
|
||||||
print("compare adresse exit lastname")
|
print("compare adresse exit lastname")
|
||||||
return False
|
return False
|
||||||
if new['firstname'].replace('.','') != old.firstName:
|
if self.ifNotNull(new['firstname']).replace('.','') != old.firstName:
|
||||||
print("compare adresse exit firstname")
|
print("compare adresse exit firstname")
|
||||||
return False
|
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")
|
print("compare adresse exit date")
|
||||||
return False
|
return False
|
||||||
if f"{new['street'].strip()} {new['street_number'].strip()}" != f"{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 ({new['street'].strip()} {new['street_number'].strip()}) != [" + 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
|
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")
|
print("compare adresse exit city")
|
||||||
return False
|
return False
|
||||||
if new["addr_2"] != old.addr_2 and int(code) < 100:
|
if new["addr_2"] != old.addr_2 and int(code) < 100:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
VERSION = "20230620-1453"
|
VERSION = "20230620-1502"
|
||||||
Reference in New Issue
Block a user