diff --git a/main.py b/main.py index a0f7397..7366a35 100644 --- a/main.py +++ b/main.py @@ -500,8 +500,9 @@ class ClercAttrib2Biz(): if data.Intervention["destination_name"] is not None: concat_str += con + data.Intervention["destination_name"] con = ", " - concat_str += con + data.Intervention["destination_street"] + " " + self.ifNotNull(data.Intervention["destination_street_number"]) - con = ", " + if data.Intervention["destination_street"] is not None: + concat_str += con + data.Intervention["destination_street"] + " " + self.ifNotNull(data.Intervention["destination_street_number"]) + con = ", " concat_str += con + data.Intervention["destination_postal_code"] + " " + data.Intervention["destination_city"] csv_col.data[15] = concat_str # Adresse DEST @@ -510,8 +511,9 @@ class ClercAttrib2Biz(): if data.Intervention["site_name"] is not None: concat_str += con + data.Intervention["site_name"] con = ", " - concat_str += con + self.ifNotNull(data.Intervention["site_street"]) + " " + self.ifNotNull(data.Intervention["site_street_number"]) - con = ", " + if data.Intervention["site_street"] is not None: + concat_str += con + self.ifNotNull(data.Intervention["site_street"]) + " " + self.ifNotNull(data.Intervention["site_street_number"]) + con = ", " concat_str += con + self.ifNotNull(data.Intervention["site_postal_code"]) + " " + self.ifNotNull(data.Intervention["site_city"]) csv_col.data[18] = concat_str # Adresse PEC print(f'debug id:{data.data["id"]} code: {data.Debtor["code"]}') @@ -651,6 +653,7 @@ class ClercAttrib2Biz(): csv_col.data[107] = data.Patient["fip_number"] csv_col.data[107] += " - " + data.data["comments"] if data.data["comments"] is not None else "" csv_col.data[116] = self.ifNotNull(data.Patient["category"]) + " - " + self.ifNotNull(data.Intervention["type"]) + csv_col.data[117] = data.Intervention["kilometers"] csv_col.data[135] = data.Intervention["base_name"] csv_col.data[136] = 2 if data.Intervention["base_name"] == "Uvrier" else 3 csv_col.data[146] = csv_col.data[136]