07/03/2024 - 22h30
parent
6f767f06cf
commit
a41f34f607
|
@ -1,11 +1,10 @@
|
|||
<?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="06/03/2024 - 22h15">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="ssdqs">
|
||||
<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$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -75,13 +74,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00188" summary="5555">
|
||||
<created>1704469014108</created>
|
||||
<option name="number" value="00188" />
|
||||
<option name="presentableId" value="LOCAL-00188" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1704469014109</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00189" summary="05/01/24 - 20h30">
|
||||
<created>1704482897223</created>
|
||||
<option name="number" value="00189" />
|
||||
|
@ -418,7 +410,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1709759516692</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="237" />
|
||||
<task id="LOCAL-00237" summary="ssdqs">
|
||||
<created>1709821854106</created>
|
||||
<option name="number" value="00237" />
|
||||
<option name="presentableId" value="LOCAL-00237" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1709821854108</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="238" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -433,7 +432,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="04/02/2024 - 23h" />
|
||||
<MESSAGE value="05/02/2024 -23h" />
|
||||
<MESSAGE value="06/02/2024 -20h" />
|
||||
<MESSAGE value="08/02/2024 -20h" />
|
||||
|
@ -458,6 +456,7 @@
|
|||
<MESSAGE value="sss" />
|
||||
<MESSAGE value="04/03/2024 - 22h15" />
|
||||
<MESSAGE value="06/03/2024 - 22h15" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="06/03/2024 - 22h15" />
|
||||
<MESSAGE value="ssdqs" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="ssdqs" />
|
||||
</component>
|
||||
</project>
|
1707
Log/log_file.log
1707
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -1159,6 +1159,11 @@ def GetAllValideSessionPartner_List(diction):
|
|||
else:
|
||||
val['session_etape'] = ""
|
||||
|
||||
if ("invoiced_statut" in retVal.keys()):
|
||||
val['invoiced_statut'] = retVal['invoiced_statut']
|
||||
else:
|
||||
val['invoiced_statut'] = "0"
|
||||
|
||||
if( "titre" in retVal.keys()):
|
||||
val['titre'] = retVal['titre']
|
||||
else:
|
||||
|
@ -1431,6 +1436,11 @@ def GetAllValideSessionPartner_List_filter_like(diction):
|
|||
else:
|
||||
val['session_etape'] = ""
|
||||
|
||||
if ("invoiced_statut" in retVal.keys()):
|
||||
val['invoiced_statut'] = retVal['invoiced_statut']
|
||||
else:
|
||||
val['invoiced_statut'] = "0"
|
||||
|
||||
if( "session_status" in retVal.keys()):
|
||||
val['session_status'] = retVal['session_status']
|
||||
else:
|
||||
|
@ -1681,6 +1691,11 @@ def GetAllValideSessionPartner_List_no_filter(diction):
|
|||
else:
|
||||
val['session_etape'] = ""
|
||||
|
||||
if ("invoiced_statut" in retVal.keys()):
|
||||
val['invoiced_statut'] = retVal['invoiced_statut']
|
||||
else:
|
||||
val['invoiced_statut'] = "0"
|
||||
|
||||
if( "session_status" in retVal.keys()):
|
||||
val['session_status'] = retVal['session_status']
|
||||
else:
|
||||
|
@ -7238,6 +7253,42 @@ def Prepare_and_Send_Facture_From_Session_By_Email(tab_files, Folder, diction):
|
|||
|
||||
tab_local_invoice_ref_interne.append(str(local_invoice_ref_interne))
|
||||
|
||||
"""
|
||||
07/03/20204 : mettre un statut de facturation sur la session afin de voir
|
||||
tout de suite quel session est entièrement facturée ou partiellement.
|
||||
|
||||
regles :
|
||||
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
|
||||
"""
|
||||
nb_inscription_facture = MYSY_GV.dbname['inscription'].count_documents(
|
||||
{'partner_owner_recid': my_partner['recid'],
|
||||
'invoiced': '1'})
|
||||
|
||||
nb_inscription_non_facture = MYSY_GV.dbname['inscription'].count_documents(
|
||||
{'partner_owner_recid': my_partner['recid'],
|
||||
'invoiced': {'$ne': '1'}})
|
||||
|
||||
nb_inscription_valide = MYSY_GV.dbname['inscription'].count_documents(
|
||||
{'partner_owner_recid': my_partner['recid'],
|
||||
'status': '1'})
|
||||
|
||||
invoiced_statut = "0"
|
||||
if (nb_inscription_facture == nb_inscription_valide):
|
||||
# toutes les inscription valides ont été facturée
|
||||
invoiced_statut = "2"
|
||||
elif (nb_inscription_facture > 0):
|
||||
# Au moins une ligne a été facturée
|
||||
invoiced_statut = "1"
|
||||
|
||||
# Mise à jour du statut de facturation de la session
|
||||
MYSY_GV.dbname['session_formation'].update_one({'partner_owner_recid': my_partner['recid'],
|
||||
'valide': '1',
|
||||
'_id': ObjectId(str(diction['session_id']))
|
||||
},
|
||||
{'$set': {'invoiced_statut': invoiced_statut}})
|
||||
|
||||
|
||||
# Creation de l'historique dans les action 'courrier_template_tracking_history'
|
||||
local_qry = {'partner_owner_recid':str(my_partner['recid']), 'session_id':str(diction['session_id']),
|
||||
|
@ -8418,6 +8469,45 @@ def Prepare_and_Send_Facture_From_Session_By_Inscription_Id(tab_files, Folder, d
|
|||
|
||||
tab_local_invoice_ref_interne.append(str(local_invoice_ref_interne))
|
||||
|
||||
"""
|
||||
07/03/20204 : mettre un statut de facturation sur la session afin de voir
|
||||
tout de suite quel session est entièrement facturée ou partiellement.
|
||||
|
||||
regles :
|
||||
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
|
||||
"""
|
||||
nb_inscription_facture = MYSY_GV.dbname['inscription'].count_documents({'partner_owner_recid':my_partner['recid'],
|
||||
'invoiced':'1'})
|
||||
|
||||
nb_inscription_non_facture = MYSY_GV.dbname['inscription'].count_documents(
|
||||
{'partner_owner_recid': my_partner['recid'],
|
||||
'invoiced': {'$ne':'1'}})
|
||||
|
||||
nb_inscription_valide = MYSY_GV.dbname['inscription'].count_documents(
|
||||
{'partner_owner_recid': my_partner['recid'],
|
||||
'status':'1'})
|
||||
|
||||
invoiced_statut = "0"
|
||||
if( nb_inscription_facture == nb_inscription_valide ):
|
||||
# toutes les inscription valides ont été facturée
|
||||
invoiced_statut = "2"
|
||||
elif ( nb_inscription_facture > 0 ):
|
||||
# Au moins une ligne a été facturée
|
||||
invoiced_statut = "1"
|
||||
|
||||
# Mise à jour du statut de facturation de la session
|
||||
MYSY_GV.dbname['session_formation'].update_one({'partner_owner_recid':my_partner['recid'],
|
||||
'valide':'1',
|
||||
'_id':ObjectId(str(diction['session_id']))
|
||||
},
|
||||
{'$set':{'invoiced_statut':invoiced_statut}})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Creation de l'historique dans les action 'courrier_template_tracking_history'
|
||||
local_qry = {'partner_owner_recid': str(my_partner['recid']), 'session_id': str(diction['session_id']),
|
||||
'invoiced_ref': {'$in': tab_local_invoice_ref_interne}}
|
||||
|
@ -8522,7 +8612,7 @@ def Invoice_Partner_From_Session_By_Inscription_Id( diction):
|
|||
'client_rattachement_id':str(diction['partner_client_id']),
|
||||
'_id':{'$in':diction['tab_inscription_ids']}}
|
||||
|
||||
print(" KRY === ", qry)
|
||||
|
||||
# Recuperation des données du stagiaire
|
||||
inscription_data = MYSY_GV.dbname['inscription'].find({'session_id': str(diction['session_id']),
|
||||
'status': '1',
|
||||
|
|
Loading…
Reference in New Issue