nettoyage du code débiteur

This commit is contained in:
Ambulance Clerc
2023-01-24 16:12:08 +01:00
parent 894a8bbfbb
commit d4e5ff6f1b
3 changed files with 5 additions and 3 deletions

View File

@@ -1 +1 @@
20230124-1547
20230124-1611

View File

@@ -1,4 +1,5 @@
import csv
import re
import json
import os
import logging
@@ -354,7 +355,8 @@ class ClercAttrib2Biz():
if data.data["comments"] is not None:
data.data["comments"] = data.data["comments"].strip().replace("\n",'')
if data.Debtor["code"] is not None:
data.Debtor["code"] = data.Debtor["code"].strip().replace("'","").replace("*","")
data.Debtor["code"] = data.Debtor["code"].strip()
data.Debtor["code"] = re.sub(r'[^0-9]', '', data.Debtor["code"])
if "name" in data.Debtor.keys() and data.Debtor["name"] is not None:
data.Debtor["name"] = data.Debtor["name"].replace("(facturation)","")

View File

@@ -1 +1 @@
VERSION = "20230124-1547"
VERSION = "20230124-1611"