add VSL
This commit is contained in:
43
main.py
43
main.py
@@ -551,8 +551,10 @@ class ClercAttrib2Biz():
|
|||||||
#self.draw_test(item_1=data.Patient, item_2=addresses_exist)
|
#self.draw_test(item_1=data.Patient, item_2=addresses_exist)
|
||||||
#messagebox.showerror(title="AVS Trouvé", message=f"Le code AVS de l'adresse {self.attrib_link.patient_AVS} est déjà existant: [{self.attrib_link.debtor_code}], merci de le corriger ")
|
#messagebox.showerror(title="AVS Trouvé", message=f"Le code AVS de l'adresse {self.attrib_link.patient_AVS} est déjà existant: [{self.attrib_link.debtor_code}], merci de le corriger ")
|
||||||
|
|
||||||
b_HRF = False
|
b_HRF = False
|
||||||
sHRF = ""
|
sHRF = ""
|
||||||
|
|
||||||
|
b_VSL = False
|
||||||
|
|
||||||
facture_total = 0
|
facture_total = 0
|
||||||
for article in data.Articles:
|
for article in data.Articles:
|
||||||
@@ -560,11 +562,14 @@ class ClercAttrib2Biz():
|
|||||||
facture_total += float(self.attrib_link.get_value_from_attrib(data=article,obj="article",key="price"))
|
facture_total += float(self.attrib_link.get_value_from_attrib(data=article,obj="article",key="price"))
|
||||||
|
|
||||||
if "code" in article.keys():
|
if "code" in article.keys():
|
||||||
if self.attrib_link.get_value_from_attrib(data=article,obj="article",key="code") == "HRF":
|
temp_code = self.attrib_link.get_value_from_attrib(data=article,obj="article",key="code")
|
||||||
|
if temp_code == "HRF":
|
||||||
b_HRF = True
|
b_HRF = True
|
||||||
sHRF = self.attrib_link.get_value_from_attrib(data=article,obj="article",key="line_1").replace("h", ":")
|
sHRF = self.attrib_link.get_value_from_attrib(data=article,obj="article",key="line_1").replace("h", ":")
|
||||||
print(f"pass HRF => {self.attrib_link.FIP} = {b_HRF}")
|
print(f"pass HRF => {self.attrib_link.FIP} = {b_HRF}")
|
||||||
#self.logger.warning(f"HRF: {self.attrib_link.invoice_ID}")
|
#self.logger.warning(f"HRF: {self.attrib_link.invoice_ID}")
|
||||||
|
elif "VSL" in temp_code:
|
||||||
|
b_VSL = True
|
||||||
|
|
||||||
print(f"Lecture de la facture #{cur_invoice_index} {self.attrib_link.get_value_from_attrib(data=ele,obj="invoice",key="id")} montant total = {self.attrib_link.get_value_from_attrib(data=ele,obj="invoice",key="total_price")} <> {facture_total}")
|
print(f"Lecture de la facture #{cur_invoice_index} {self.attrib_link.get_value_from_attrib(data=ele,obj="invoice",key="id")} montant total = {self.attrib_link.get_value_from_attrib(data=ele,obj="invoice",key="total_price")} <> {facture_total}")
|
||||||
if float(self.attrib_link.get_value_from_attrib(data=ele,obj="invoice",key="total_price")) != facture_total:
|
if float(self.attrib_link.get_value_from_attrib(data=ele,obj="invoice",key="total_price")) != facture_total:
|
||||||
@@ -691,21 +696,24 @@ class ClercAttrib2Biz():
|
|||||||
csv_col.data[56] = 0 # prix total
|
csv_col.data[56] = 0 # prix total
|
||||||
|
|
||||||
compte_number = None
|
compte_number = None
|
||||||
if self.attrib_link.intervention_base == "Uvrier":
|
if b_VSL:
|
||||||
compte_number = 3018
|
compte_number = 3019
|
||||||
else:
|
else:
|
||||||
if self.attrib_link.intervention_type == "P1":
|
if self.attrib_link.intervention_base == "Uvrier":
|
||||||
compte_number = 3001 if self.attrib_link.intervention_team == "Planification" else 3011
|
compte_number = 3018
|
||||||
if self.attrib_link.intervention_type == "P2":
|
else:
|
||||||
compte_number = 3002 if self.attrib_link.intervention_team == "Planification" else 3012
|
if self.attrib_link.intervention_type == "P1":
|
||||||
if self.attrib_link.intervention_type == "P3":
|
compte_number = 3001 if self.attrib_link.intervention_team == "Planification" else 3011
|
||||||
compte_number = 3003 if self.attrib_link.intervention_team == "Planification" else 3013
|
if self.attrib_link.intervention_type == "P2":
|
||||||
if self.attrib_link.intervention_type == "S1":
|
compte_number = 3002 if self.attrib_link.intervention_team == "Planification" else 3012
|
||||||
compte_number = 3004 if self.attrib_link.intervention_team == "Planification" else 3014
|
if self.attrib_link.intervention_type == "P3":
|
||||||
if self.attrib_link.intervention_type == "S2":
|
compte_number = 3003 if self.attrib_link.intervention_team == "Planification" else 3013
|
||||||
compte_number = 3005 if self.attrib_link.intervention_team == "Planification" else 3015
|
if self.attrib_link.intervention_type == "S1":
|
||||||
if self.attrib_link.intervention_type == "S3":
|
compte_number = 3004 if self.attrib_link.intervention_team == "Planification" else 3014
|
||||||
compte_number = 3005 if self.attrib_link.intervention_team == "Planification" else 3015
|
if self.attrib_link.intervention_type == "S2":
|
||||||
|
compte_number = 3005 if self.attrib_link.intervention_team == "Planification" else 3015
|
||||||
|
if self.attrib_link.intervention_type == "S3":
|
||||||
|
compte_number = 3005 if self.attrib_link.intervention_team == "Planification" else 3015
|
||||||
csv_col.data[59] = compte_number
|
csv_col.data[59] = compte_number
|
||||||
|
|
||||||
csv_col.data[60] = 0
|
csv_col.data[60] = 0
|
||||||
@@ -748,8 +756,11 @@ class ClercAttrib2Biz():
|
|||||||
csv_col.data[116] = self.ifNotNull(self.attrib_link.patient_category) + " - " + self.ifNotNull(self.attrib_link.intervention_type)
|
csv_col.data[116] = self.ifNotNull(self.attrib_link.patient_category) + " - " + self.ifNotNull(self.attrib_link.intervention_type)
|
||||||
csv_col.data[118] = self.attrib_link.km
|
csv_col.data[118] = self.attrib_link.km
|
||||||
csv_col.data[135] = self.attrib_link.intervention_base
|
csv_col.data[135] = self.attrib_link.intervention_base
|
||||||
|
|
||||||
if self.attrib_link.debtor_code == "100" or self.attrib_link.debtor_code == "101" or self.attrib_link.debtor_code == "158":
|
if self.attrib_link.debtor_code == "100" or self.attrib_link.debtor_code == "101" or self.attrib_link.debtor_code == "158":
|
||||||
csv_col.data[136] = "EBILL" #code présentation de facture
|
csv_col.data[136] = "EBILL" #code présentation de facture
|
||||||
|
if b_VSL:
|
||||||
|
csv_col.data[136] = "VSL" #code présentation de facture
|
||||||
else:
|
else:
|
||||||
csv_col.data[136] = 3 #code présentation de facture
|
csv_col.data[136] = 3 #code présentation de facture
|
||||||
csv_col.data[146] = 3 #Code méthode de payement définit à 3
|
csv_col.data[146] = 3 #Code méthode de payement définit à 3
|
||||||
|
|||||||
Reference in New Issue
Block a user