19/03/2024 - 17h30

master
cherif 2024-03-19 17:43:44 +01:00
parent 52a250d9c0
commit 0389df9840
6 changed files with 7749 additions and 31 deletions

View File

@ -1,15 +1,13 @@
<?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="11/03/2024 - 15h">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="12/03/2024 - 20h30">
<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$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.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$/apprenant_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/apprenant_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partners.py" beforeDir="false" afterPath="$PROJECT_DIR$/partners.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/site_formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/site_formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/emargement.py" beforeDir="false" afterPath="$PROJECT_DIR$/emargement.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -79,13 +77,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00194" summary="12/01/24 - 16h30">
<created>1705071129313</created>
<option name="number" value="00194" />
<option name="presentableId" value="LOCAL-00194" />
<option name="project" value="LOCAL" />
<updated>1705071129313</updated>
</task>
<task id="LOCAL-00195" summary="15/01/2024 - 17h00">
<created>1705335099150</created>
<option name="number" value="00195" />
@ -422,7 +413,14 @@
<option name="project" value="LOCAL" />
<updated>1710165434010</updated>
</task>
<option name="localTasksCounter" value="243" />
<task id="LOCAL-00243" summary="12/03/2024 - 20h30">
<created>1710272089417</created>
<option name="number" value="00243" />
<option name="presentableId" value="LOCAL-00243" />
<option name="project" value="LOCAL" />
<updated>1710272089418</updated>
</task>
<option name="localTasksCounter" value="244" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -437,7 +435,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="11/02/2024 - 22h" />
<MESSAGE value="sdsdqs" />
<MESSAGE value="13/02/2024 - 11h" />
<MESSAGE value="17/02/2024 - 11h" />
@ -462,6 +459,7 @@
<MESSAGE value="ddds" />
<MESSAGE value="10/03/24 - 21h" />
<MESSAGE value="11/03/2024 - 15h" />
<option name="LAST_COMMIT_MESSAGE" value="11/03/2024 - 15h" />
<MESSAGE value="12/03/2024 - 20h30" />
<option name="LAST_COMMIT_MESSAGE" value="12/03/2024 - 20h30" />
</component>
</project>

View File

@ -652,3 +652,11 @@ Proabilité de gain valeur
"""
CRM_GAIN_PROBABILITE = ['faible', 'moyen', 'fort', 'inconnu', '']
"""
Statut de facturation d'un session de formation : invoiced_statut
- Si toutes les inscription associées à une session sont facturée ==> invoiced_statut de la session = 2
- Si au moins une inscription associée à une session est facturé ==> invoiced_statut de la session = 1
- Si non invoiced_statut de la session =0
"""

File diff suppressed because one or more lines are too long

View File

@ -660,6 +660,11 @@ def GetSessionFormation(diction):
user['class_external_code'] = class_external_code
user['class_ispublished'] = class_ispublished
if ("invoiced_statut" in retval.keys()):
user['invoiced_statut'] = retval['invoiced_statut']
else:
user['invoiced_statut'] = "0"
formateur_nom_prenom = ""
# Si il y a un code formateur_id, alors on va recuperer les nom et prenom du formation
if( "formateur_id" in retval.keys() and retval['formateur_id']):
@ -808,6 +813,13 @@ def Get_Given_SessionFormation_From_Id(diction):
user['class_external_code'] = class_external_code
user['class_ispublished'] = class_ispublished
if ("invoiced_statut" in retval.keys() ):
user['invoiced_statut'] = retval['invoiced_statut']
else:
user['invoiced_statut'] = "0"
formateur_nom_prenom = ""
# Si il y a un code formateur_id, alors on va recuperer les nom et prenom du formation
if( "formateur_id" in retval.keys() and retval['formateur_id']):

View File

@ -140,8 +140,9 @@ def add_class(diction):
mydata['source'] = diction['source']
class_source = diction['source']
# On ne prend que les valeurs de lms_class_code qui semble cohérent (taille > 2), si non on met vide
lms_class_code = ""
if ("lms_class_code" in diction.keys()):
if ("lms_class_code" in diction.keys() and diction['lms_class_code'] and len(str(diction['lms_class_code'])) > 2):
if diction['lms_class_code']:
mydata['lms_class_code'] = diction['lms_class_code']
lms_class_code = diction['lms_class_code']
@ -677,9 +678,14 @@ def update_class(diction):
if ("internal_url" in diction.keys()):
my_internal_url = diction['internal_url']
# On ne prend que les valeurs de lms_class_code qui semble cohérent (taille > 2), si non on met vide
lms_class_code = ""
if ("lms_class_code" in diction.keys()):
mydata['lms_class_code'] = diction['lms_class_code']
if(len(str(diction['lms_class_code'])) > 2 ):
mydata['lms_class_code'] = diction['lms_class_code']
else:
mydata['lms_class_code'] = ""
if ("class_level" in diction.keys()):
mydata['class_level'] = diction['class_level']
@ -1802,6 +1808,9 @@ def get_class(diction):
if diction['token']:
my_token = diction['token']
print(" #### my token = ", my_token)
client_connected_recid = ""
connection_type = ""
if ("connection_type" in diction.keys()):
@ -1879,19 +1888,28 @@ def get_class(diction):
#print(' ICICICIC '+str(filt_external_code))
print(" #### internal_url = ", internal_url)
#print(" #### internal_url = ", internal_url)
qry_02 = {'valide':'1','locked':'0','internal_url':internal_url, 'published':'1'}
#print(" #### qty_02 = ", qry_02)
# Recuperation des info du partenaire propriaitaire comme : ces certification (qualiopi, datadock, etc) et son nom
tmp_class_data = MYSY_GV.dbname['myclass'].find_one({'valide':'1','locked':'0','internal_url':internal_url, 'published':'1'},
{"_id": 1, "partner_owner_recid": 1, } )
if( tmp_class_data is None or tmp_class_data["partner_owner_recid"] is None):
print(' ### tmp_class_data =', str(tmp_class_data ))
#print(' ### tmp_class_data =', str(tmp_class_data ))
mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de récupérer les données du partenaire - laa ")
return False, " Cette formation est indisponible "
tmp_partenaire_data = MYSY_GV.dbname['partnair_account'].find_one({'active':'1','locked':'0','recid':str(tmp_class_data["partner_owner_recid"]), },
)
#print(" ### la formation concernee est : ", tmp_class_data)
qry = {'active':'1','locked':'0','recid':str(tmp_class_data["partner_owner_recid"]) }
tmp_partenaire_data = MYSY_GV.dbname['partnair_account'].find_one(qry)
if (tmp_partenaire_data is None or tmp_partenaire_data["_id"] is None):
mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de récupérer les données du partenaire (2) ")
@ -1903,7 +1921,7 @@ def get_class(diction):
filt_title = {'title': {'$regex': str(diction['title']), "$options": "i"}}
print(" #### avant requete get partner_owner_recid laa ="+str(user_recid)+
print(" #### avant requete get partner_owner_recid laa yy= "+str(user_recid)+
" internal_url = "+str(my_internal_url)+
" filt_title = "+str(filt_title))
@ -4108,7 +4126,7 @@ def get_associated_class_of_partnair(diction):
filt_title = {'title': {'$regex': str(diction['title']), "$options": "i"}}
print(" #### avant requete get partner_owner_recid laa ="+str(partner_recid)+
print(" #### avant requete get partner_owner_recid laa zz="+str(partner_recid)+
" internal_url = "+str(my_internal_url)+
" filt_title = "+str(filt_title))

View File

@ -662,12 +662,30 @@ def GerneratePDFEmargementList(diction):
# Recuperation des données du partenaire
date_for_tmplate['partner_name'] = my_partner['nom']
date_for_tmplate['partner_adresse'] = my_partner['adr_street']
date_for_tmplate['partner_ville'] = my_partner['adr_city']
date_for_tmplate['partner_code_postal'] = my_partner['invoice_adr_zip']
date_for_tmplate['partner_pays'] = my_partner['adr_country']
date_for_tmplate['partner_phone'] = my_partner['telephone']
date_for_tmplate['partner_mail'] = my_partner['email']
date_for_tmplate['partner_adresse'] = ""
if( "partner_adresse" in my_partner.keys () ):
date_for_tmplate['partner_adresse'] = my_partner['adr_street']
date_for_tmplate['partner_ville'] = ""
if ("adr_city" in my_partner.keys()):
date_for_tmplate['partner_ville'] = my_partner['adr_city']
date_for_tmplate['partner_code_postal'] = ""
if ("invoice_adr_zip" in my_partner.keys()):
date_for_tmplate['partner_code_postal'] = my_partner['invoice_adr_zip']
date_for_tmplate['partner_pays'] = ""
if ("adr_country" in my_partner.keys()):
date_for_tmplate['partner_pays'] = my_partner['adr_country']
date_for_tmplate['partner_phone'] = ""
if ("telephone" in my_partner.keys()):
date_for_tmplate['partner_phone'] = my_partner['telephone']
date_for_tmplate['partner_mail'] = ""
if ("email" in my_partner.keys()):
date_for_tmplate['partner_mail'] = my_partner['email']
if( "website" in my_partner.keys() ):
date_for_tmplate['partner_website'] = my_partner['website']