06/03/23 - 17h45

master
cherif 2023-03-06 04:53:16 +01:00
parent fce7bfaa19
commit e07d56f3fe
7 changed files with 3809 additions and 44 deletions

View File

@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="24/02/23 - 23h23">
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="28/02/23 - 17h45">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/business_prices.py" beforeDir="false" afterPath="$PROJECT_DIR$/business_prices.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data_indexees.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data_indexees.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/wrapper.py" beforeDir="false" afterPath="$PROJECT_DIR$/wrapper.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/email_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -334,7 +333,14 @@
<option name="project" value="LOCAL" />
<updated>1677277431565</updated>
</task>
<option name="localTasksCounter" value="38" />
<task id="LOCAL-00038" summary="28/02/23 - 17h45">
<created>1677602770952</created>
<option name="number" value="00038" />
<option name="presentableId" value="LOCAL-00038" />
<option name="project" value="LOCAL" />
<updated>1677602770952</updated>
</task>
<option name="localTasksCounter" value="39" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -349,7 +355,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="24/12/2022 - 15h00" />
<MESSAGE value="27/12/2022 - 11h00" />
<MESSAGE value="27/12/2022 - 16h00" />
<MESSAGE value="09/01/22 à 11h" />
@ -374,7 +379,8 @@
<MESSAGE value="20/02/23 - 11h" />
<MESSAGE value="22/02/23 20h" />
<MESSAGE value="24/02/23 - 23h23" />
<option name="LAST_COMMIT_MESSAGE" value="24/02/23 - 23h23" />
<MESSAGE value="28/02/23 - 17h45" />
<option name="LAST_COMMIT_MESSAGE" value="28/02/23 - 17h45" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

File diff suppressed because one or more lines are too long

View File

@ -108,17 +108,25 @@ def add_business_price(diction):
if diction['class']:
mydata['class'] = diction['class']
client_recid = str(diction['client_recid']).strip()
local_status, local_val = mycommon.get_partner_data_from_recid(client_recid)
if(local_status is False ):
mycommon.myprint(
str(inspect.stack()[0][
3]) + " - Impossible de créer le prix, Le client n'est pas valide ")
return False, " Impossible de créer le prix, Le client n'est pas valide "
client_recid = ""
client_nom = ""
if( str(diction['client_recid']).strip() == "all"):
client_recid = ""
client_nom = "Tout client"
else:
client_recid = str(diction['client_recid']).strip()
local_status, local_val = mycommon.get_partner_data_from_recid(client_recid)
if(local_status is False ):
mycommon.myprint(
str(inspect.stack()[0][
3]) + " - Impossible de créer le prix, Le client n'est pas valide ")
return False, " Impossible de créer le prix, Le client n'est pas valide "
client_nom = local_val['nom']
mydata['client_recid'] = client_recid
mydata['client_nom'] = local_val['nom']
mydata['client_nom'] = client_nom
mydata['valide'] = "1"
mydata['date_update'] = datetime.now().strftime("%d/%m/%Y")
@ -340,13 +348,19 @@ def recherche_business_price(diction):
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer les donnees du partnaire ")
return False, "Impossible de recuperer les donnees du partnaire "
client_recid = str(diction['client_recid']).strip()
local_status = mycommon.get_user_data_from_recid(client_recid)
if (local_status is False):
mycommon.myprint(
str(inspect.stack()[0][
3]) + " - Impossible de créer le prix, Le client n'est pas valide ")
return False, " Impossible de créer le prix, Le client n'est pas valide "
client_recid = ""
client_nom = ""
if (str(diction['client_recid']).strip() == "all"):
client_recid = ""
client_nom = "Tout client"
else:
client_recid = str(diction['client_recid']).strip()
local_status = mycommon.get_user_data_from_recid(client_recid)
if (local_status is False):
mycommon.myprint(
str(inspect.stack()[0][
3]) + " - Impossible de créer le prix, Le client n'est pas valide ")
return False, " Impossible de créer le prix, Le client n'est pas valide "
return True, "ok"

View File

@ -1,4 +1,3 @@
,index,mots,occurence,moyenne,id_formation,source_field
0,0,aromatherapie,1,0.33,AR,title
1,1,integrative,1,0.33,AR,title
2,2,praticien,1,0.33,AR,title
0,0,developpement,1,0.5,5Disc_0008,title
1,1,personnel,1,0.5,5Disc_0008,title

1 index mots occurence moyenne id_formation source_field
2 0 0 aromatherapie developpement 1 0.33 0.5 AR 5Disc_0008 title
3 1 1 integrative personnel 1 0.33 0.5 AR 5Disc_0008 title
2 2 praticien 1 0.33 AR title

View File

@ -1,4 +1,3 @@
mots occurence moyenne id_formation source_field
0 aromatherapie 1 0.33 AR title
1 integrative 1 0.33 AR title
2 praticien 1 0.33 AR title
0 developpement 1 0.5 5Disc_0008 title
1 personnel 1 0.5 5Disc_0008 title

View File

@ -1846,14 +1846,14 @@ def ManualSendInvoiceEmailRIB(diction):
TEMPLATE_FILE = "Template/MySy_Invoice_RIB_tpl.html"
template = templateEnv.get_template(TEMPLATE_FILE)
body = {
"params": {"order_id": "005G",
"date_order": ": 01/02/2023",
"total_ht": "150",
"tva": "0",
"total_ttc": "150",
"client_name": "HIFMI-INSTITUTE",
"client_address": "50 AV PIERRE ET MARIE CURIE",
"client_zip_ville": "93700 DRANCY",
"params": {"order_id": "007G",
"date_order": ": 01/03/2023",
"total_ht": "171",
"tva": "34,2",
"total_ttc": "205,2",
"client_name": "CAP SANTE",
"client_address": "4 Allée des Jacquiers",
"client_zip_ville": "97427 L'Etang Salé",
"client_pays": "France",
"packs": "PACK GOLD ",
"detail_packs": "-- Support téléphonique -- "
@ -1862,15 +1862,16 @@ def ManualSendInvoiceEmailRIB(diction):
"Customisation de l'affichage d'une formation -- "
"Préférence/ Diffusion géographique -- "
"Publication d'un article -- "
"Envoi de 1000 emails markéting / mois --"
"Reporting Dynamique et personnalisé",
"qty": "3",
"unit_price": "50",
"montant": "150",
"invoice_id": "FACT_230200021",
"invoice_date": "07/02/2023",
"due_date": "07/02/2022",
"orign_order": "Contrat 005G",
"qty": "2",
"unit_price": "85.5",
"montant": "171",
"invoice_id": "FACT_230300026",
"invoice_date": "01/03/2023",
"due_date": "01/03/2022",
"orign_order": "Contrat 007G",
}
}
sourceHtml = template.render(params=body["params"])

View File

@ -2726,10 +2726,12 @@ Cette fonction un texte et ajuste des tag, pour faciliter l'import et formatage
<g> => Gras <g>
<t> => tablulation
<l> => saut de ligne
<b> => bullet point
"""
def format_MySy_Text_Tag(sentence):
sentence = sentence.replace("<b>", "&bull;")
sentence = sentence.replace("<l>", "<br/>")
sentence = sentence.replace("<e>", "<\t>")
sentence = sentence.replace("<t>", "&emsp;")
sentence = sentence.replace("<g>", "<b>")
sentence = sentence.replace("</g>", "</b>")