Compare commits
3 Commits
20230421-0
...
20230425-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48353c6f98 | ||
|
|
a94b2cc0d6 | ||
|
|
9ba8998c32 |
@@ -100,10 +100,10 @@ class Check_addresses_popup(Toplevel):
|
|||||||
value_color = "red"
|
value_color = "red"
|
||||||
con = "*"
|
con = "*"
|
||||||
|
|
||||||
Label(new_frame, text=label, font=label_font).grid(row=self.x_row, column=0, sticky="W")
|
Label(new_frame, text=str(label), font=label_font).grid(row=self.x_row, column=0, sticky="W")
|
||||||
Label(new_frame, text=con + str1 + con, fg=value_color).grid(row=self.x_row, column=1, sticky="W")
|
Label(new_frame, text=con + str(str1) + con, fg=value_color).grid(row=self.x_row, column=1, sticky="W")
|
||||||
Label(old_frame, text=label, font=label_font).grid(row=self.x_row, column=0, sticky="W")
|
Label(old_frame, text=str(label), font=label_font).grid(row=self.x_row, column=0, sticky="W")
|
||||||
Label(old_frame, text=con + str2 + con, fg=value_color).grid(row=self.x_row, column=1, sticky="W")
|
Label(old_frame, text=con + str(str2) + con, fg=value_color).grid(row=self.x_row, column=1, sticky="W")
|
||||||
|
|
||||||
self.x_row += 1
|
self.x_row += 1
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
20230421-0031
|
20230425-1407
|
||||||
22
main.py
22
main.py
@@ -128,6 +128,8 @@ class ClercAttrib2Biz():
|
|||||||
with open(os.path.join(temp_dir,"config.dat"),"wb") as pickle_file:
|
with open(os.path.join(temp_dir,"config.dat"),"wb") as pickle_file:
|
||||||
pickle.dump(self.config,pickle_file, pickle.HIGHEST_PROTOCOL)
|
pickle.dump(self.config,pickle_file, pickle.HIGHEST_PROTOCOL)
|
||||||
def load_config(self):
|
def load_config(self):
|
||||||
|
if not os.path.exists(os.path.join(temp_dir, "config.dat")):
|
||||||
|
self.save_config()
|
||||||
with open(os.path.join(temp_dir, "config.dat"), "rb") as pickle_file:
|
with open(os.path.join(temp_dir, "config.dat"), "rb") as pickle_file:
|
||||||
self.config = pickle.load(pickle_file)
|
self.config = pickle.load(pickle_file)
|
||||||
|
|
||||||
@@ -283,14 +285,18 @@ class ClercAttrib2Biz():
|
|||||||
if os.path.exists(file_addresses_path):
|
if os.path.exists(file_addresses_path):
|
||||||
for record in DBF(file_addresses_path):
|
for record in DBF(file_addresses_path):
|
||||||
o_addresse = cls_addresse()
|
o_addresse = cls_addresse()
|
||||||
o_addresse.AVS = record["AD_CODE"]
|
o_addresse.AVS = str(record["AD_CODE"])
|
||||||
o_addresse.lastName = record["AD_NOM"]
|
o_addresse.lastName =str( record["AD_NOM"])
|
||||||
o_addresse.firstName = record["AD_PRENOM"]
|
o_addresse.firstName = str(record["AD_PRENOM"])
|
||||||
o_addresse.birth = record["AD_NAISSAN"]
|
if record["AD_NAISSAN"] is not None:
|
||||||
o_addresse.street = record["AD_RUE_2"]
|
o_addresse.birth = datetime.strptime(str(record["AD_NAISSAN"]), "%Y-%m-%d").strftime("%d.%m.%Y")
|
||||||
o_addresse.street_cpl = record["AD_RUE_1"]
|
|
||||||
o_addresse.npa = record["AD_NPA"]
|
else:
|
||||||
o_addresse.city = record["AD_VILLE"]
|
o_addresse.birth = ""
|
||||||
|
o_addresse.street =str( record["AD_RUE_2"])
|
||||||
|
o_addresse.street_cpl =str( record["AD_RUE_1"])
|
||||||
|
o_addresse.npa =str( record["AD_NPA"])
|
||||||
|
o_addresse.city = str(record["AD_VILLE"])
|
||||||
self.addresses.add_addresse(o_addresse)
|
self.addresses.add_addresse(o_addresse)
|
||||||
logging.warning(f"Chargement du fichier adresses.dbf terminé ! {len(self.addresses.items)} adresses trouvées ")
|
logging.warning(f"Chargement du fichier adresses.dbf terminé ! {len(self.addresses.items)} adresses trouvées ")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
VERSION = "20230421-0031"
|
VERSION = "20230425-1407"
|
||||||
Reference in New Issue
Block a user