15/08/23 -14h

master
cherif 2023-08-15 14:29:43 +02:00
parent ab53c2ef73
commit fafd1009d3
4 changed files with 4949 additions and 26 deletions

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="13/08/23 - 21h30">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="14/08/23 - 16h30">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" 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$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/email_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_mgt.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -69,13 +69,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00019" summary="13/05/23 - 17h">
<created>1683991333030</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1683991333030</updated>
</task>
<task id="LOCAL-00020" summary="13/05/23 - 23h">
<created>1684015246929</created>
<option name="number" value="00020" />
@ -412,7 +405,14 @@
<option name="project" value="LOCAL" />
<updated>1691955829354</updated>
</task>
<option name="localTasksCounter" value="68" />
<task id="LOCAL-00068" summary="14/08/23 - 16h30">
<created>1692023863799</created>
<option name="number" value="00068" />
<option name="presentableId" value="LOCAL-00068" />
<option name="project" value="LOCAL" />
<updated>1692023863799</updated>
</task>
<option name="localTasksCounter" value="69" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -427,7 +427,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="09/07/23 - 21h" />
<MESSAGE value="10/07/23 - 22h" />
<MESSAGE value="12/07/23 - 21h" />
<MESSAGE value="16/07/23 - 21h" />
@ -452,6 +451,7 @@
<MESSAGE value="12/08/23 - 12h" />
<MESSAGE value="13/08/23 - 14h" />
<MESSAGE value="13/08/23 - 21h30" />
<option name="LAST_COMMIT_MESSAGE" value="13/08/23 - 21h30" />
<MESSAGE value="14/08/23 - 16h30" />
<option name="LAST_COMMIT_MESSAGE" value="14/08/23 - 16h30" />
</component>
</project>

File diff suppressed because one or more lines are too long

View File

@ -333,9 +333,8 @@ def Add_Update_SessionFormation(diction):
return False, "Impossible d'ajouter/mettre à jour la session '" + str(diction['code_session']) + "' "
print("len(str(Warning_Message)) = ", len(str(Warning_Message)), " ### CONTOLE : ", Warning_Message)
print("len(str(Warning_Message)) = ", len(str(Warning_Message)), )
if(len(str(Warning_Message)) > 2 ):
print(" ### KOOOOOOOOOOOOOOOOOOOOOO")
return True, str(Warning_Message)
return True, " La session de formation à bien été mise à jour"
@ -646,6 +645,9 @@ def GetAllValideSessionPartner_List(diction):
cpt = cpt + 1
val['class_internal_url'] = retVal['class_internal_url']
val['code_session'] = retVal['code_session']
val['session_etape'] = retVal['session_etape']
val['session_status'] = retVal['session_status']
val['date_debut'] = retVal['date_debut'][0:10]
val['date_fin'] = retVal['date_fin'][0:10]
val['date_debut_inscription'] = retVal['date_debut_inscription'][0:10]
@ -653,15 +655,62 @@ def GetAllValideSessionPartner_List(diction):
val['distantiel'] = retVal['distantiel']
val['formateur'] = retVal['formateur']
val['nb_participant'] = retVal['nb_participant']
nb_participant = "0"
if( "nb_participant" in retVal.keys()):
nb_participant = retVal['nb_participant']
val['nb_participant'] = nb_participant
val['presentiel'] = retVal['presentiel']
val['prix_session'] = retVal['prix_session']
val['title'] = retVal['myclass_collection'][0]['title']
val['domaine'] = retVal['myclass_collection'][0]['domaine']
val['duration'] = retVal['myclass_collection'][0]['duration']
if( str(retVal['myclass_collection'][0]['duration_unit']) == "heure"):
val['duration_concat'] = str(retVal['myclass_collection'][0]['duration'])+" h"
elif (str(retVal['myclass_collection'][0]['duration_unit']) == "jour"):
val['duration_concat'] = str(retVal['myclass_collection'][0]['duration']) + " j"
elif (str(retVal['myclass_collection'][0]['duration_unit']) == "semaine"):
val['duration_concat'] = str(retVal['myclass_collection'][0]['duration']) + " s"
elif (str(retVal['myclass_collection'][0]['duration_unit']) == "mois"):
val['duration_concat'] = str(retVal['myclass_collection'][0]['duration']) + " m"
elif (str(retVal['myclass_collection'][0]['duration_unit']) == "annee"):
val['duration_concat'] = str(retVal['myclass_collection'][0]['duration']) + " a"
elif (str(retVal['myclass_collection'][0]['duration_unit']) == "user_rythme"):
val['duration_concat'] = str(retVal['myclass_collection'][0]['duration']) + " u"
else :
val['duration_concat'] = str(retVal['myclass_collection'][0]['duration']) + " ?"
val['duration'] = str(retVal['myclass_collection'][0]['duration'])
val['duration_unit'] = retVal['myclass_collection'][0]['duration_unit']
## Recuperation du nombre d'inscrits
Count_Inscrit = MYSY_GV.dbname['inscription'].count_documents({'session_id':str(retVal['code_session']), 'class_internal_url':str(retVal['class_internal_url']),
'status':"1"})
val['nb_inscrit'] = str(Count_Inscrit)
## Recuperation du nombre de preinscrits
Count_Preinscrit = MYSY_GV.dbname['inscription'].count_documents(
{'session_id': str(retVal['code_session']), 'class_internal_url': str(retVal['class_internal_url']),
'status': "0"})
val['nb_preinscrit'] = str(Count_Preinscrit)
taux_replissage = "0"
if( str(nb_participant) != "0"):
taux_replissage = round(int(mycommon.tryInt(Count_Inscrit)) / int(mycommon.tryInt(nb_participant)), 2)
val['taux_replissage'] = str(taux_replissage)
RetObject.append(mycommon.JSONEncoder().encode(val))

View File

@ -2057,23 +2057,23 @@ def ManualSendInvoiceEmailRIB_PortCities(diction):
body = {
"params": {"order_id": "0010G",
"date_order": ": 01/06/2023",
"total_ht": "14 400",
"tva": "2 880",
"total_ttc": "17 280",
"total_ht": "3 200",
"tva": "640",
"total_ttc": "3 840",
"client_name": "Port Cities France SAS",
"client_address": "180 Av. du Prado",
"client_zip_ville": "13008 Marseille",
"client_pays": "France",
"packs": "Chef de projet Odoo ",
"detail_packs": "Avignon - Siège CAPL ",
"qty": "18 jrs",
"qty": "4 jrs",
"unit_price": "800 €",
"montant": "14 400 ",
"montant": "3 200",
"invoice_id": "FACT_230800033",
"invoice_date": "01/08/2023",
"due_date": "01/08/2023",
"invoice_id": "FACT_230800038",
"invoice_date": "15/08/2023",
"due_date": "15/08/2023",
"orign_order": "Contrat N°0010G",
}
}
@ -2107,7 +2107,7 @@ def ManualSendInvoiceEmailRIB_PortCities(diction):
#print(" ### body 22 = ", body)
sourceHtml = template.render(json_data=body["params"])
orig_file_name = "invoice_FACT_230700033.pdf"
orig_file_name = "invoice_FACT_230800038.pdf"
outputFilename = str(MYSY_GV.INVOICE_DIRECTORY) + str(orig_file_name)
# open output file for writing (truncated binary)