master
cherif 2024-06-23 00:10:18 +02:00
parent 3f020e68c5
commit f64735dd74
5 changed files with 3073 additions and 24 deletions

View File

@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="21/06/24 - 22h30"> <list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="22/06/24 - 17h30">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <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$/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$/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$/partner_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/emargement.py" beforeDir="false" afterPath="$PROJECT_DIR$/emargement.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -78,13 +76,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1680804787304</updated> <updated>1680804787304</updated>
</task> </task>
<task id="LOCAL-00288" summary="07/05/2024 - 17h30">
<created>1715096332563</created>
<option name="number" value="00288" />
<option name="presentableId" value="LOCAL-00288" />
<option name="project" value="LOCAL" />
<updated>1715096332563</updated>
</task>
<task id="LOCAL-00289" summary="08/05/2024 - 17h30"> <task id="LOCAL-00289" summary="08/05/2024 - 17h30">
<created>1715182713801</created> <created>1715182713801</created>
<option name="number" value="00289" /> <option name="number" value="00289" />
@ -421,7 +412,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1719001828472</updated> <updated>1719001828472</updated>
</task> </task>
<option name="localTasksCounter" value="337" /> <task id="LOCAL-00337" summary="22/06/24 - 17h30">
<created>1719069758164</created>
<option name="number" value="00337" />
<option name="presentableId" value="LOCAL-00337" />
<option name="project" value="LOCAL" />
<updated>1719069758165</updated>
</task>
<option name="localTasksCounter" value="338" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
@ -463,7 +461,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="20/05/2024 - 14h00" />
<MESSAGE value="20/05/2024 - 22h00" /> <MESSAGE value="20/05/2024 - 22h00" />
<MESSAGE value="21/05/2024 - 21h" /> <MESSAGE value="21/05/2024 - 21h" />
<MESSAGE value="sdsqq" /> <MESSAGE value="sdsqq" />
@ -488,6 +485,7 @@
<MESSAGE value="18/06/2024 - 21h30" /> <MESSAGE value="18/06/2024 - 21h30" />
<MESSAGE value="ss" /> <MESSAGE value="ss" />
<MESSAGE value="21/06/24 - 22h30" /> <MESSAGE value="21/06/24 - 22h30" />
<option name="LAST_COMMIT_MESSAGE" value="21/06/24 - 22h30" /> <MESSAGE value="22/06/24 - 17h30" />
<option name="LAST_COMMIT_MESSAGE" value="22/06/24 - 17h30" />
</component> </component>
</project> </project>

View File

@ -12380,7 +12380,7 @@ def Create_Emargement_Send_Email_From_Inscription(diction):
val_emarge = MYSY_GV.dbname['emargement'].find_one({'_id':ObjectId(str(my_emargement_id)), 'valide':'1', 'locked':'0', val_emarge = MYSY_GV.dbname['emargement'].find_one({'_id':ObjectId(str(my_emargement_id)), 'valide':'1', 'locked':'0',
'partner_owner_recid':my_partner['recid']}) 'partner_owner_recid':my_partner['recid']})
local_status, local_retval = module_editique.Editic_Log_History_Action_From_courrier_template_type_document_ref_interne( local_status, local_retval = module_editique.Editic_Log_History_Action_From_courrier_template_type_document_ref_interne(
my_partner, "EMARGEMENT_FORMATION", str(val_emarge['session_id']), "inscription", str(val_emarge['inscription_id']), my_partner, "EMARGEMENT_FORMATION", str(val_emarge['session_id']), "inscription", str(val_emarge['inscription_id']),
"") "")

File diff suppressed because one or more lines are too long

View File

@ -2622,7 +2622,10 @@ On par d'annulation totale, donc pas partiel
/!\ : On créer une souche spéciale pour les avoirs /!\ : On créer une souche spéciale pour les avoirs
apres la creation de l'avoir, on va ajouter sur la facture apres la creation de l'avoir, on va ajouter sur la facture
la reference de l'avoir associé la reference de l'avoir associé.
A l'annulation de la facture, si la facture est liée à un inscrit
sur une session, on aller remettre la session à 'non facture'
""" """
def Create_Invoice_Avoir_Total(diction): def Create_Invoice_Avoir_Total(diction):
@ -2828,6 +2831,53 @@ def Create_Invoice_Avoir_Total(diction):
mycommon.myprint( " WARNING : Impossible d'inserer la ligne d'avoir pour l'avoir "+str(credit_notes_reference)) mycommon.myprint( " WARNING : Impossible d'inserer la ligne d'avoir pour l'avoir "+str(credit_notes_reference))
"""
Apres avoir créer l'avoir, il faut aller voir s'il la facture est liée à une inscription
si c'est le cas, on remettre le statut de ligne d'inscription à non-facture (invoiced).
mais on laisse volontaire la ref de facture, on l'efface pas la ref de la facture.
on va juste ajouter l'avoir
"""
is_valide_invoice_data = MYSY_GV.dbname['partner_invoice_header'].find_one({'_id':ObjectId(str(diction['_id'])),
'partner_owner_recid':my_partner['recid'],
'valide':'1',
'locked':'0', }, {'invoice_header_ref_interne':1})
print(" ### is_valide_invoice_data = ", is_valide_invoice_data)
print("QRRR = ", {'invoiced_ref': {'$regex': str(is_valide_invoice_data['invoice_header_ref_interne'])},
'valide':'1',
'partner_owner_recid':str(my_partner['recid'])})
inscription_data = MYSY_GV.dbname['inscription'].find_one({'invoiced_ref': {'$regex': str(is_valide_invoice_data['invoice_header_ref_interne'])},
'valide':'1',
'partner_owner_recid':str(my_partner['recid'])})
if(inscription_data ):
current_invoiced_ref = ""
local_invoiced = ""
if( "invoiced_ref" in inscription_data.keys() ):
current_invoiced_ref = inscription_data['invoiced_ref']
if ("invoiced" in inscription_data.keys()):
local_invoiced = inscription_data['invoiced']
new_data = {}
new_data['invoiced_ref'] = current_invoiced_ref+", "+str(credit_notes_reference)
new_data['invoiced'] = "0"
print( {'_id': ObjectId(str(inscription_data['_id'])), 'valide': '1',
'partner_owner_recid': str(my_partner['recid'])
} )
ret_val2 = MYSY_GV.dbname['inscription'].find_one_and_update(
{'_id': ObjectId(str(inscription_data['_id'])), 'valide': '1',
'partner_owner_recid': str(my_partner['recid'])
},
{"$set": new_data},
return_document=ReturnDocument.AFTER,
upsert=False,
)
return True, "L'avoir a été créé avec la référence "+str(liste_credit_node), liste_credit_node return True, "L'avoir a été créé avec la référence "+str(liste_credit_node), liste_credit_node

View File

@ -6076,8 +6076,10 @@ A la validation, pour chaque ligne du devis,
prenom = num_devis_Prenom_cpt prenom = num_devis_Prenom_cpt
email = num_devis_cpt@email.com email = num_devis_cpt@email.com
3 - Apres la reservation, si le partenaire a activier et demandé d'appliquer la signature electronique 3 - Apres la reservation, si le partenaire a activer et demandé d'appliquer la signature electronique
alors on declenche le processus de signature electronique alors on declenche le processus de signature electronique
/!\ : lorsqu'on fait la reservation de place dans la session, on doit ajouter le client facturer = au client normal
""" """
def Insert_Quotation_To_Session(diction): def Insert_Quotation_To_Session(diction):
@ -6223,15 +6225,16 @@ def Insert_Quotation_To_Session(diction):
cpt = cpt + 1 cpt = cpt + 1
new_data = {} new_data = {}
new_data['nom'] = str(qotation_line['order_header_ref_interne'])+"_Reservation_Nom_"+str(cpt) new_data['nom'] = str(qotation_line['order_header_ref_interne'])+"_Resa_nom_"+str(cpt)
new_data['prenom'] = str(qotation_line['order_header_ref_interne']) + "_Reservation_Prenom_" + str(cpt) new_data['prenom'] = str(qotation_line['order_header_ref_interne']) + "_Resa_prenom_" + str(cpt)
new_data['email'] = str(qotation_line['order_header_ref_interne']) + "_Reservation_mail_" + str(cpt)+"@mail.com" new_data['email'] = str(qotation_line['order_header_ref_interne']) + "_Resa_mail_" + str(cpt)+"@mail.com"
new_data['telephone'] = "01010101" new_data['telephone'] = "01010101"
new_data['modefinancement'] = "" new_data['modefinancement'] = ""
new_data['class_internal_url'] = str(is_order_line_session_id_data['class_internal_url']) new_data['class_internal_url'] = str(is_order_line_session_id_data['class_internal_url'])
new_data['session_id'] = str(qotation_line['order_line_session_id']) new_data['session_id'] = str(qotation_line['order_line_session_id'])
new_data['token'] = str(diction['token']) new_data['token'] = str(diction['token'])
new_data['client_rattachement_id'] = str(is_valide_qotation_data['order_header_client_id']) new_data['client_rattachement_id'] = str(is_valide_qotation_data['order_header_client_id'])
new_data['facture_client_rattachement_id'] = str(is_valide_qotation_data['order_header_client_id'])
new_data['civilite'] = "neutre" new_data['civilite'] = "neutre"
new_data['quotation_id'] = str(qotation_line['order_header_id']) new_data['quotation_id'] = str(qotation_line['order_header_id'])
new_data['status'] = "0" new_data['status'] = "0"
@ -6245,8 +6248,6 @@ def Insert_Quotation_To_Session(diction):
else: else:
nb_resa_line = nb_resa_line + 1 nb_resa_line = nb_resa_line + 1
""" """
Mettre à jour du devis avec la date de validation et de reservation Mettre à jour du devis avec la date de validation et de reservation
""" """
@ -7230,7 +7231,8 @@ def Send_Quotation_Remind_Level1(diction):
""" """
Cette fonction créé automatiquement un devis Cette fonction créé automatiquement un devis
avec l'_id du lead concerée avec l'_id du lead concerée.
si besoin on créer le prospect
""" """
def Create_Automatic_Quotation(diction): def Create_Automatic_Quotation(diction):
try: try:
@ -7322,6 +7324,11 @@ def Create_Automatic_Quotation(diction):
new_client_diction['siret'] = valide_lead_website_data['siret'] new_client_diction['siret'] = valide_lead_website_data['siret']
new_client_diction['is_company'] = "1" new_client_diction['is_company'] = "1"
# Pour les données de facturation
new_client_diction['invoice_nom'] = valide_lead_website_data['raison_sociale']
new_client_diction['invoice_email'] = valide_lead_website_data['email_requester']
local_prospect_status, local_prospect_retval = partner_client.Add_Partner_Prospect(new_client_diction) local_prospect_status, local_prospect_retval = partner_client.Add_Partner_Prospect(new_client_diction)
if( local_prospect_status is False ): if( local_prospect_status is False ):