From 3567b6942f944e8c05b9e0c04cb616334a858ffa Mon Sep 17 00:00:00 2001 From: Ambulance Clerc Date: Mon, 30 May 2022 10:57:06 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9bug=20des=20virgule=20dans=20adresse=20d?= =?UTF-8?q?e=20PEC=20et=20adresse=20DEST=20+=20ajout=20des=20KM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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]