|
|
|
@@ -495,6 +495,7 @@ class ClercAttrib2Biz():
|
|
|
|
csv_col.data[139] = "COND-30" # Conditions de payement à 30, COND-30 selon config dans winbiz
|
|
|
|
csv_col.data[139] = "COND-30" # Conditions de payement à 30, COND-30 selon config dans winbiz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if "without_transportation" in data.Intervention.keys() and data.Intervention["without_transportation"] == True:
|
|
|
|
if "without_transportation" in data.Intervention.keys() and data.Intervention["without_transportation"] == True:
|
|
|
|
csv_col.data[15] = "Sans transport"
|
|
|
|
csv_col.data[15] = "Sans transport"
|
|
|
|
print(f"->NO DEST** {data.data['id']}")
|
|
|
|
print(f"->NO DEST** {data.data['id']}")
|
|
|
|
@@ -572,6 +573,10 @@ class ClercAttrib2Biz():
|
|
|
|
if data.Debtor["city"] is not None:
|
|
|
|
if data.Debtor["city"] is not None:
|
|
|
|
concat_str += con + self.ifNotNull(data.Debtor["postal_code"]) + " " + self.ifNotNull(data.Debtor["city"])
|
|
|
|
concat_str += con + self.ifNotNull(data.Debtor["postal_code"]) + " " + self.ifNotNull(data.Debtor["city"])
|
|
|
|
con = "#chr(13)##chr(10)#"
|
|
|
|
con = "#chr(13)##chr(10)#"
|
|
|
|
|
|
|
|
if data.Debtor["country_name"] != "Suisse":
|
|
|
|
|
|
|
|
concat_str += con + data.Debtor["country_name"]
|
|
|
|
|
|
|
|
con = "#chr(13)##chr(10)#"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -649,15 +654,18 @@ class ClercAttrib2Biz():
|
|
|
|
csv_col.data[72] = "BU - 73 - aff"
|
|
|
|
csv_col.data[72] = "BU - 73 - aff"
|
|
|
|
csv_col.data[73] = 0
|
|
|
|
csv_col.data[73] = 0
|
|
|
|
|
|
|
|
|
|
|
|
csv_col.data[115] = self.ifNotNull(data.Patient["lastname"]) + " " + self.ifNotNull(data.Patient["firstname"])
|
|
|
|
#Objet facture
|
|
|
|
csv_col.data[108] = data.Patient["complement"]
|
|
|
|
csv_col.data[108] = self.ifNotNull(data.Patient["lastname"]) + " " + self.ifNotNull(data.Patient["firstname"])
|
|
|
|
|
|
|
|
csv_col.data[115] = data.Patient["complement"]
|
|
|
|
csv_col.data[109] = datetime.strptime(data.Patient["birthdate"], "%Y-%m-%d").strftime("%d.%m.%Y") if data.Patient["birthdate"] is not None else ""
|
|
|
|
csv_col.data[109] = datetime.strptime(data.Patient["birthdate"], "%Y-%m-%d").strftime("%d.%m.%Y") if data.Patient["birthdate"] is not None else ""
|
|
|
|
if data.Patient["insurance_policy_number"] is not None and '-' not in data.Patient["insurance_policy_number"]:
|
|
|
|
if data.Patient["insurance_policy_number"] is not None and '-' not in data.Patient["insurance_policy_number"]:
|
|
|
|
csv_col.data[109] += ", " + data.Patient["insurance_policy_number"]
|
|
|
|
csv_col.data[109] += ", " + data.Patient["insurance_policy_number"]
|
|
|
|
|
|
|
|
|
|
|
|
csv_col.data[110] = data.Patient["insurance_name"]
|
|
|
|
csv_col.data[110] = data.Patient["insurance_name"]
|
|
|
|
csv_col.data[111] = datetime.strptime(data.Intervention["start_time"], "%Y-%m-%dT%H:%M:%S%z").strftime(
|
|
|
|
date_PEC = datetime.strptime(data.Intervention["start_time"], "%Y-%m-%dT%H:%M:%S%z").strftime(
|
|
|
|
"%d.%m.%Y") # Date PEC
|
|
|
|
"%d.%m.%Y")
|
|
|
|
|
|
|
|
csv_col.data[51] = date_PEC # Date de ligne articles
|
|
|
|
|
|
|
|
csv_col.data[111] =date_PEC # Date PEC
|
|
|
|
csv_col.data[111] += " - " + datetime.strptime(data.Intervention["start_time"], "%Y-%m-%dT%H:%M:%S%z").strftime(
|
|
|
|
csv_col.data[111] += " - " + datetime.strptime(data.Intervention["start_time"], "%Y-%m-%dT%H:%M:%S%z").strftime(
|
|
|
|
"%H:%M") # Heure START PEC
|
|
|
|
"%H:%M") # Heure START PEC
|
|
|
|
|
|
|
|
|
|
|
|
@@ -677,8 +685,8 @@ class ClercAttrib2Biz():
|
|
|
|
csv_col.data[116] = self.ifNotNull(data.Patient["category"]) + " - " + self.ifNotNull(data.Intervention["type"])
|
|
|
|
csv_col.data[116] = self.ifNotNull(data.Patient["category"]) + " - " + self.ifNotNull(data.Intervention["type"])
|
|
|
|
csv_col.data[118] = data.Intervention["kilometers"]
|
|
|
|
csv_col.data[118] = data.Intervention["kilometers"]
|
|
|
|
csv_col.data[135] = data.Intervention["base_name"]
|
|
|
|
csv_col.data[135] = data.Intervention["base_name"]
|
|
|
|
csv_col.data[136] = 2 if data.Intervention["base_name"] == "Uvrier" else 3
|
|
|
|
csv_col.data[136] = 3 if data.Debtor["code"] != "101" else "EBILL" #code présentation de facture
|
|
|
|
csv_col.data[146] = csv_col.data[136]
|
|
|
|
csv_col.data[146] = 3 #Code méthode de payement définit à 3
|
|
|
|
csv_col.data[168] = 1 if data.Intervention["team_name"] == "Planification" else 2
|
|
|
|
csv_col.data[168] = 1 if data.Intervention["team_name"] == "Planification" else 2
|
|
|
|
csv_col.data[169] = data.Patient['insurance_policy_number']
|
|
|
|
csv_col.data[169] = data.Patient['insurance_policy_number']
|
|
|
|
|
|
|
|
|
|
|
|
@@ -698,7 +706,7 @@ class ClercAttrib2Biz():
|
|
|
|
self.a_index["global"].append(key)
|
|
|
|
self.a_index["global"].append(key)
|
|
|
|
obj.data.append(data)
|
|
|
|
obj.data.append(data)
|
|
|
|
|
|
|
|
|
|
|
|
def convertFile(self, data, filename):
|
|
|
|
def convertFile(self, data, filename): #à utiliser pour un export avec fichier excel de Thomas
|
|
|
|
self.count_facture += len(data["invoices"])
|
|
|
|
self.count_facture += len(data["invoices"])
|
|
|
|
self.a_listings["to_check"] = []
|
|
|
|
self.a_listings["to_check"] = []
|
|
|
|
|
|
|
|
|
|
|
|
|