17/07/2024 - 11h30
parent
c09423538a
commit
a924711dbf
|
@ -1,21 +1,15 @@
|
||||||
<?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="dqsdqs">
|
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="dqsdqss">
|
||||||
<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$/E_Sign_Document.py" beforeDir="false" afterPath="$PROJECT_DIR$/E_Sign_Document.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/E_Sign_Document.py" beforeDir="false" afterPath="$PROJECT_DIR$/E_Sign_Document.py" 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$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/apprenant_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/apprenant_mgt.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/module_editique.py" beforeDir="false" afterPath="$PROJECT_DIR$/module_editique.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/partner_client.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_client.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/partner_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/partner_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/survey_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/survey_mgt.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.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" />
|
||||||
|
@ -85,13 +79,6 @@
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1680804787304</updated>
|
<updated>1680804787304</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00304" summary="sdf">
|
|
||||||
<created>1716053773665</created>
|
|
||||||
<option name="number" value="00304" />
|
|
||||||
<option name="presentableId" value="LOCAL-00304" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1716053773666</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00305" summary="18/05/2024 - 22h30">
|
<task id="LOCAL-00305" summary="18/05/2024 - 22h30">
|
||||||
<created>1716064737342</created>
|
<created>1716064737342</created>
|
||||||
<option name="number" value="00305" />
|
<option name="number" value="00305" />
|
||||||
|
@ -428,7 +415,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1721069603830</updated>
|
<updated>1721069603830</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="353" />
|
<task id="LOCAL-00353" summary="dqsdqss">
|
||||||
|
<created>1721132859678</created>
|
||||||
|
<option name="number" value="00353" />
|
||||||
|
<option name="presentableId" value="LOCAL-00353" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1721132859680</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="354" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -470,7 +464,6 @@
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="06/06/2024 - 12h" />
|
|
||||||
<MESSAGE value="06/06/2024 - 20h" />
|
<MESSAGE value="06/06/2024 - 20h" />
|
||||||
<MESSAGE value="07/06/2024 - 22h30" />
|
<MESSAGE value="07/06/2024 - 22h30" />
|
||||||
<MESSAGE value="ssq" />
|
<MESSAGE value="ssq" />
|
||||||
|
@ -495,6 +488,7 @@
|
||||||
<MESSAGE value="13/07/2024 - 22h" />
|
<MESSAGE value="13/07/2024 - 22h" />
|
||||||
<MESSAGE value="14/07/2024 - 22h" />
|
<MESSAGE value="14/07/2024 - 22h" />
|
||||||
<MESSAGE value="dqsdqs" />
|
<MESSAGE value="dqsdqs" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="dqsdqs" />
|
<MESSAGE value="dqsdqss" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="dqsdqss" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -800,6 +800,10 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
||||||
'secret_key_signature': str(diction['secret_key_signature']),
|
'secret_key_signature': str(diction['secret_key_signature']),
|
||||||
'email_destinataire': str(diction['email_destinataire'])}
|
'email_destinataire': str(diction['email_destinataire'])}
|
||||||
|
|
||||||
|
print({'valide': '1', 'locked': '0',
|
||||||
|
'_id': ObjectId(str(diction['e_doc_id'])),
|
||||||
|
'secret_key_signature': str(diction['secret_key_signature']),
|
||||||
|
'email_destinataire': str(diction['email_destinataire'])})
|
||||||
|
|
||||||
result = MYSY_GV.dbname['e_document_signe'].find_one_and_update(
|
result = MYSY_GV.dbname['e_document_signe'].find_one_and_update(
|
||||||
qry_key,
|
qry_key,
|
||||||
|
@ -807,6 +811,8 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
||||||
upsert=False,
|
upsert=False,
|
||||||
return_document=ReturnDocument.AFTER
|
return_document=ReturnDocument.AFTER
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print(" result == ", result)
|
||||||
if ("_id" not in result.keys()):
|
if ("_id" not in result.keys()):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
" Impossible de signer le document (2) ")
|
" Impossible de signer le document (2) ")
|
||||||
|
@ -1256,10 +1262,48 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Si il s'agit d'un devis, alors on procede a la resevation des places
|
Si il s'agit d'un devis, alors on procede a la resevation des places
|
||||||
|
et on valide le devis. on le met à 'gagné'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if (str(e_docment_type).strip() == "quotation"):
|
if (str(e_docment_type).strip() == "quotation"):
|
||||||
|
|
||||||
|
"""
|
||||||
|
mettre le devis à gagné
|
||||||
|
"""
|
||||||
|
#entete de devis
|
||||||
|
qry_key = {'valide': '1', 'locked': '0',
|
||||||
|
'_id': ObjectId(str(e_document_data['related_collection_id'])),
|
||||||
|
'partner_owner_recid': str(local_partner_owner_recid),
|
||||||
|
}
|
||||||
|
|
||||||
|
print(" ##mettre le devis à gagné ", qry_key)
|
||||||
|
local_new_data = {}
|
||||||
|
local_new_data['order_header_status'] = "3"
|
||||||
|
|
||||||
|
|
||||||
|
result = MYSY_GV.dbname['partner_order_header'].find_one_and_update(
|
||||||
|
qry_key,
|
||||||
|
{"$set": local_new_data},
|
||||||
|
upsert=False,
|
||||||
|
return_document=ReturnDocument.AFTER
|
||||||
|
)
|
||||||
|
|
||||||
|
# ligne de devis
|
||||||
|
# entete de devis
|
||||||
|
qry_key = {'valide': '1', 'locked': '0',
|
||||||
|
'order_header_id': str(e_document_data['related_collection_id']),
|
||||||
|
'partner_owner_recid': str(local_partner_owner_recid),
|
||||||
|
}
|
||||||
|
|
||||||
|
print(" ##mettre le devis à gagné ", qry_key)
|
||||||
|
local_new_data = {}
|
||||||
|
local_new_data['order_line_status'] = "3"
|
||||||
|
|
||||||
|
update = MYSY_GV.dbname['partner_order_line'].update_many(qry_key,
|
||||||
|
{'$set': local_new_data})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Recuperer les données de la quotation
|
Recuperer les données de la quotation
|
||||||
"""
|
"""
|
||||||
|
@ -1882,12 +1926,19 @@ def Sent_E_Document_Signature_Request(diction):
|
||||||
for New_retVal in MYSY_GV.dbname['e_document_signe'].find(qry).sort([("_id", pymongo.DESCENDING), ]):
|
for New_retVal in MYSY_GV.dbname['e_document_signe'].find(qry).sort([("_id", pymongo.DESCENDING), ]):
|
||||||
if ("email_destinataire" in New_retVal.keys() and New_retVal['email_destinataire']):
|
if ("email_destinataire" in New_retVal.keys() and New_retVal['email_destinataire']):
|
||||||
list_email = str(New_retVal['email_destinataire']).replace(",", ";")
|
list_email = str(New_retVal['email_destinataire']).replace(",", ";")
|
||||||
tab_list_email = list_email.split(";")
|
|
||||||
|
|
||||||
|
tab_list_email_tmp = list_email.split(";")
|
||||||
|
tab_list_email = []
|
||||||
|
for local_tmp in tab_list_email_tmp:
|
||||||
|
tab_list_email.append(str(local_tmp).strip())
|
||||||
|
|
||||||
if( diction['user_email'] in tab_list_email ):
|
if( diction['user_email'] in tab_list_email ):
|
||||||
is_e_document_valide = "1"
|
is_e_document_valide = "1"
|
||||||
e_document_data = New_retVal
|
e_document_data = New_retVal
|
||||||
e_document_open_code = New_retVal['secret_key_open']
|
e_document_open_code = New_retVal['secret_key_open']
|
||||||
|
|
||||||
|
|
||||||
if('type' in New_retVal.keys() and New_retVal['type']):
|
if('type' in New_retVal.keys() and New_retVal['type']):
|
||||||
e_document_type = New_retVal['type']
|
e_document_type = New_retVal['type']
|
||||||
|
|
||||||
|
|
|
@ -230,6 +230,10 @@ def AddStagiairetoClass(diction):
|
||||||
if ("civilite" in diction.keys()):
|
if ("civilite" in diction.keys()):
|
||||||
if diction['civilite']:
|
if diction['civilite']:
|
||||||
civilite = str(diction['civilite']).strip().lower()
|
civilite = str(diction['civilite']).strip().lower()
|
||||||
|
|
||||||
|
if (str(civilite) not in MYSY_GV.CIVILITE):
|
||||||
|
civilite = "neutre"
|
||||||
|
|
||||||
mydata['civilite'] = civilite
|
mydata['civilite'] = civilite
|
||||||
|
|
||||||
|
|
||||||
|
@ -812,6 +816,9 @@ def UpdateStagiairetoClass(diction):
|
||||||
if ("civilite" in diction.keys()):
|
if ("civilite" in diction.keys()):
|
||||||
mydata['civilite'] = str(diction['civilite']).strip().lower()
|
mydata['civilite'] = str(diction['civilite']).strip().lower()
|
||||||
|
|
||||||
|
if (str(mydata['civilite']) not in MYSY_GV.CIVILITE):
|
||||||
|
mydata['civilite'] = "neutre"
|
||||||
|
|
||||||
|
|
||||||
if ("date_naissance" in diction.keys()):
|
if ("date_naissance" in diction.keys()):
|
||||||
if diction['date_naissance']:
|
if diction['date_naissance']:
|
||||||
|
@ -1486,6 +1493,9 @@ def GetAllClassStagiaire(diction):
|
||||||
else:
|
else:
|
||||||
user['civilite'] = "neutre"
|
user['civilite'] = "neutre"
|
||||||
|
|
||||||
|
if( str( user['civilite']) not in MYSY_GV.CIVILITE):
|
||||||
|
user['civilite'] = "neutre"
|
||||||
|
|
||||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||||
|
|
||||||
return True, RetObject
|
return True, RetObject
|
||||||
|
@ -2538,6 +2548,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
||||||
if ("civilite" in df.keys()):
|
if ("civilite" in df.keys()):
|
||||||
if (str(df['civilite'].values[n])):
|
if (str(df['civilite'].values[n])):
|
||||||
civilite = str(df['civilite'].values[n]).lower()
|
civilite = str(df['civilite'].values[n]).lower()
|
||||||
|
|
||||||
mydata['civilite'] = str(civilite).lower()
|
mydata['civilite'] = str(civilite).lower()
|
||||||
if( civilite not in MYSY_GV.CIVILITE):
|
if( civilite not in MYSY_GV.CIVILITE):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
|
@ -6299,6 +6310,9 @@ def AcceptAttendeeInscription(diction):
|
||||||
else:
|
else:
|
||||||
new_apprenant_diction['civilite'] = ""
|
new_apprenant_diction['civilite'] = ""
|
||||||
|
|
||||||
|
if (str(new_apprenant_diction['civilite']) not in MYSY_GV.CIVILITE):
|
||||||
|
new_apprenant_diction['civilite'] = "neutre"
|
||||||
|
|
||||||
if("telephone" in inscription_data.keys()):
|
if("telephone" in inscription_data.keys()):
|
||||||
new_apprenant_diction['telephone'] = inscription_data['telephone']
|
new_apprenant_diction['telephone'] = inscription_data['telephone']
|
||||||
else:
|
else:
|
||||||
|
@ -7388,6 +7402,9 @@ def Get_Statgaire_List_Partner_with_filter(diction):
|
||||||
else:
|
else:
|
||||||
val['civilite'] = ""
|
val['civilite'] = ""
|
||||||
|
|
||||||
|
if (str(val['civilite']) not in MYSY_GV.CIVILITE):
|
||||||
|
val['civilite'] = "neutre"
|
||||||
|
|
||||||
|
|
||||||
if( "modefinancement" in retVal.keys()):
|
if( "modefinancement" in retVal.keys()):
|
||||||
val['modefinancement'] = retVal['modefinancement']
|
val['modefinancement'] = retVal['modefinancement']
|
||||||
|
@ -7577,6 +7594,9 @@ def Get_Statgaire_List_Partner_with_filter(diction):
|
||||||
else:
|
else:
|
||||||
val['civilite'] = ""
|
val['civilite'] = ""
|
||||||
|
|
||||||
|
if (str(val['civilite']) not in MYSY_GV.CIVILITE):
|
||||||
|
val['civilite'] = "neutre"
|
||||||
|
|
||||||
local_nom = ""
|
local_nom = ""
|
||||||
if ("nom" in retVal['apprenant_collection'][0].keys()):
|
if ("nom" in retVal['apprenant_collection'][0].keys()):
|
||||||
local_nom = retVal['apprenant_collection'][0]['nom']
|
local_nom = retVal['apprenant_collection'][0]['nom']
|
||||||
|
@ -7824,6 +7844,11 @@ def GetAttendeeDetail_perSession_from_line_id(diction):
|
||||||
local_civilite = ""
|
local_civilite = ""
|
||||||
if ("civilite" in local_Insc_retval.keys()):
|
if ("civilite" in local_Insc_retval.keys()):
|
||||||
local_civilite = local_Insc_retval['civilite']
|
local_civilite = local_Insc_retval['civilite']
|
||||||
|
|
||||||
|
if (local_civilite not in MYSY_GV.CIVILITE):
|
||||||
|
local_civilite = "neutre"
|
||||||
|
|
||||||
|
|
||||||
my_retrun_dict['civilite'] = str(local_civilite).lower()
|
my_retrun_dict['civilite'] = str(local_civilite).lower()
|
||||||
|
|
||||||
|
|
||||||
|
@ -11652,6 +11677,9 @@ def Get_Statgaire_List_Partner_with_filter_FOR_ONLY_INSCRIPTION_NO_TOKEN(diction
|
||||||
else:
|
else:
|
||||||
val['civilite'] = ""
|
val['civilite'] = ""
|
||||||
|
|
||||||
|
if (str(val['civilite']) not in MYSY_GV.CIVILITE):
|
||||||
|
val['civilite'] = "neutre"
|
||||||
|
|
||||||
if ("modefinancement" in retVal.keys()):
|
if ("modefinancement" in retVal.keys()):
|
||||||
val['modefinancement'] = retVal['modefinancement']
|
val['modefinancement'] = retVal['modefinancement']
|
||||||
else:
|
else:
|
||||||
|
|
3872
Log/log_file.log
3872
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -1819,6 +1819,28 @@ def GetAllValideSessionPartner_List_filter_like(diction):
|
||||||
val['qty_in_quotation'] = str(total_qty)
|
val['qty_in_quotation'] = str(total_qty)
|
||||||
val['qty_in_quotation_list_quotation'] = ', '.join(tab_quotation_ref)
|
val['qty_in_quotation_list_quotation'] = ', '.join(tab_quotation_ref)
|
||||||
|
|
||||||
|
"""
|
||||||
|
Pour chaque session recuperer le statut de controle d'alert
|
||||||
|
"""
|
||||||
|
is_session_alert = ""
|
||||||
|
session_alert_message = ""
|
||||||
|
|
||||||
|
local_diction = {}
|
||||||
|
local_diction['token'] = str(diction['token'])
|
||||||
|
local_diction['session_id'] = str(retVal['_id'])
|
||||||
|
|
||||||
|
local_check_session_alert_status, local_check_session_alert_retval, local_check_session_alert_is_warning = mycommon.Check_Partner_Session_Alert(
|
||||||
|
local_diction)
|
||||||
|
|
||||||
|
if (local_check_session_alert_status):
|
||||||
|
is_session_alert = local_check_session_alert_is_warning
|
||||||
|
session_alert_message = local_check_session_alert_retval
|
||||||
|
|
||||||
|
val['is_session_alert'] = is_session_alert
|
||||||
|
val['session_alert_message'] = session_alert_message
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (filt_session_start_date and filt_session_end_date):
|
if (filt_session_start_date and filt_session_end_date):
|
||||||
# Si on a un filtre sur la date debut et de fin de session
|
# Si on a un filtre sur la date debut et de fin de session
|
||||||
if ((datetime.strptime(str(retVal['date_debut'][0:10]).strip(), '%d/%m/%Y') >= datetime.strptime(
|
if ((datetime.strptime(str(retVal['date_debut'][0:10]).strip(), '%d/%m/%Y') >= datetime.strptime(
|
||||||
|
|
|
@ -690,7 +690,7 @@ def Get_Given_Partner_Invoice_Lines(diction):
|
||||||
"""
|
"""
|
||||||
Recuperation des produits et services
|
Recuperation des produits et services
|
||||||
"""
|
"""
|
||||||
query = [{'$match': {'$and': [filt_invoice_header_id,
|
query = [{'$match': {'$and': [ filt_invoice_header_id,
|
||||||
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
||||||
{'$lookup': {
|
{'$lookup': {
|
||||||
'from': 'partner_produit_service',
|
'from': 'partner_produit_service',
|
||||||
|
@ -3371,6 +3371,7 @@ def Create_Invoice_Avoir_Total(diction):
|
||||||
|
|
||||||
liste_credit_node.append(credit_notes_reference)
|
liste_credit_node.append(credit_notes_reference)
|
||||||
|
|
||||||
|
invoice_header_inserted_id = inserted_id
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Mettre à jour la facture avec la reference de l'avoir
|
Mettre à jour la facture avec la reference de l'avoir
|
||||||
|
@ -3410,7 +3411,7 @@ def Create_Invoice_Avoir_Total(diction):
|
||||||
local_credit_note_line['invoice_header_ref_interne_origin'] = local_invoice['invoice_header_ref_interne']
|
local_credit_note_line['invoice_header_ref_interne_origin'] = local_invoice['invoice_header_ref_interne']
|
||||||
local_credit_note_line['invoice_header_ref_interne'] = credit_notes_reference
|
local_credit_note_line['invoice_header_ref_interne'] = credit_notes_reference
|
||||||
|
|
||||||
local_credit_note_line['invoice_header_id'] = str(inserted_id)
|
local_credit_note_line['invoice_header_id'] = str(invoice_header_inserted_id)
|
||||||
local_credit_note_line['invoice_line_type'] = "avoir"
|
local_credit_note_line['invoice_line_type'] = "avoir"
|
||||||
|
|
||||||
local_credit_note_line['invoice_date'] = invoice_date_time
|
local_credit_note_line['invoice_date'] = invoice_date_time
|
||||||
|
@ -3437,10 +3438,7 @@ def Create_Invoice_Avoir_Total(diction):
|
||||||
'valide':'1',
|
'valide':'1',
|
||||||
'locked':'0', }, {'invoice_header_ref_interne':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'])},
|
inscription_data = MYSY_GV.dbname['inscription'].find_one({'invoiced_ref': {'$regex': str(is_valide_invoice_data['invoice_header_ref_interne'])},
|
||||||
'valide':'1',
|
'valide':'1',
|
||||||
|
|
|
@ -4937,15 +4937,15 @@ def Compute_Order_Header(diction):
|
||||||
Tous les calculs, ok, on met à l'entete de de l'order
|
Tous les calculs, ok, on met à l'entete de de l'order
|
||||||
"""
|
"""
|
||||||
header_computed_data = {}
|
header_computed_data = {}
|
||||||
header_computed_data['total_lines_montant_reduction'] = str(round(line_sum_order_line_montant_reduction, 3))
|
header_computed_data['total_lines_montant_reduction'] = str(round(line_sum_order_line_montant_reduction, 2))
|
||||||
header_computed_data['total_lines_hors_taxe_before_lines_reduction'] = str(round(line_sum_order_line_montant_hors_taxes_before_reduction, 3))
|
header_computed_data['total_lines_hors_taxe_before_lines_reduction'] = str(round(line_sum_order_line_montant_hors_taxes_before_reduction, 2))
|
||||||
header_computed_data['total_lines_hors_taxe_after_lines_reduction'] = str(round(line_sum_order_line_montant_hors_taxes_after_reduction, 3))
|
header_computed_data['total_lines_hors_taxe_after_lines_reduction'] = str(round(line_sum_order_line_montant_hors_taxes_after_reduction, 2))
|
||||||
header_computed_data['order_header_montant_reduction'] = str(round(header_reduction_type_value_total_amount, 3))
|
header_computed_data['order_header_montant_reduction'] = str(round(header_reduction_type_value_total_amount, 2))
|
||||||
header_computed_data['total_header_hors_taxe_before_header_reduction'] = str(round(line_sum_order_line_montant_hors_taxes_after_reduction, 3))
|
header_computed_data['total_header_hors_taxe_before_header_reduction'] = str(round(line_sum_order_line_montant_hors_taxes_after_reduction, 2))
|
||||||
header_computed_data['total_header_hors_taxe_after_header_reduction'] = str(round(global_order_amount_ht_after_header_reduction, 3))
|
header_computed_data['total_header_hors_taxe_after_header_reduction'] = str(round(global_order_amount_ht_after_header_reduction, 2))
|
||||||
header_computed_data['order_header_tax'] = "TVA "+str(partner_taux_tva)+"%"
|
header_computed_data['order_header_tax'] = "TVA "+str(partner_taux_tva)+"%"
|
||||||
header_computed_data['order_header_tax_amount'] = str(round(line_sum_order_line_tax_amount, 3))
|
header_computed_data['order_header_tax_amount'] = str(round(line_sum_order_line_tax_amount, 2))
|
||||||
header_computed_data['total_header_toutes_taxes'] = str(round(global_order_amount_ttc, 3))
|
header_computed_data['total_header_toutes_taxes'] = str(round(global_order_amount_ttc, 2))
|
||||||
|
|
||||||
header_computed_data['date_update'] = str(datetime.now())
|
header_computed_data['date_update'] = str(datetime.now())
|
||||||
|
|
||||||
|
@ -6686,12 +6686,12 @@ def Send_Partner_Order_By_Email(diction):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for email in tab_emails_destinataire:
|
for email in tab_emails_destinataire:
|
||||||
print(" ### traitement du mail : ", email)
|
|
||||||
new_send_e_document_diction = {}
|
new_send_e_document_diction = {}
|
||||||
new_send_e_document_diction['token'] = diction['token']
|
new_send_e_document_diction['token'] = diction['token']
|
||||||
new_send_e_document_diction['e_doc_id'] = str(local_retval_e_doc)
|
new_send_e_document_diction['e_doc_id'] = str(local_retval_e_doc)
|
||||||
new_send_e_document_diction['user_email'] = str(email)
|
new_send_e_document_diction['user_email'] = str(email)
|
||||||
|
print(" ### traitement du mail new_send_e_document_diction = : ", new_send_e_document_diction)
|
||||||
local_status_send_e_doc, local_send_retval_e_doc = E_Sign_Document.Sent_E_Document_Signature_Request(
|
local_status_send_e_doc, local_send_retval_e_doc = E_Sign_Document.Sent_E_Document_Signature_Request(
|
||||||
new_send_e_document_diction)
|
new_send_e_document_diction)
|
||||||
if (local_status_send_e_doc is False):
|
if (local_status_send_e_doc is False):
|
||||||
|
@ -6791,10 +6791,17 @@ def Convert_Quotation_to_Order(diction):
|
||||||
my_partner['recid'])},
|
my_partner['recid'])},
|
||||||
)
|
)
|
||||||
|
|
||||||
if( Quotation_header_data_tmp['order_header_status'] != '1'):
|
if( Quotation_header_data_tmp['order_header_status'] != '1' and Quotation_header_data_tmp['order_header_status'] != '3'):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][3]) + " - Le statut du devis n'est pas 'en cours'")
|
str(inspect.stack()[0][3]) + " - Le statut du devis n'est pas 'en cours' ou 'gagné'")
|
||||||
return False, " Le statut du devis n'est pas 'en cours'", False
|
return False, " Le statut du devis n'est pas 'en cours' ou 'gagné'", False
|
||||||
|
|
||||||
|
existing_related_order_internal_ref = ""
|
||||||
|
if( "related_order_internal_ref" in Quotation_header_data_tmp.keys() and str(Quotation_header_data_tmp['related_order_internal_ref']) != "" ):
|
||||||
|
mycommon.myprint(
|
||||||
|
str(inspect.stack()[0][3]) + " Ce devis a déjà été converti en commande avec la réf. "+str(Quotation_header_data_tmp['related_order_internal_ref']))
|
||||||
|
return False, " Ce devis a déjà été converti en commande avec la réf. "+str(Quotation_header_data_tmp['related_order_internal_ref']) , False
|
||||||
|
|
||||||
|
|
||||||
mytoday = datetime.today().strftime("%d/%m/%Y")
|
mytoday = datetime.today().strftime("%d/%m/%Y")
|
||||||
if( "order_header_date_expiration" in Quotation_header_data_tmp.keys() and len(str(Quotation_header_data_tmp['order_header_date_expiration']).strip()) > 0):
|
if( "order_header_date_expiration" in Quotation_header_data_tmp.keys() and len(str(Quotation_header_data_tmp['order_header_date_expiration']).strip()) > 0):
|
||||||
|
|
|
@ -2006,6 +2006,35 @@ def Get_List_Survey_with_filter(diction):
|
||||||
user['session_title'] = session_title
|
user['session_title'] = session_title
|
||||||
user['session_code'] = session_code
|
user['session_code'] = session_code
|
||||||
|
|
||||||
|
"""
|
||||||
|
Recuperation des info de la ressource humaine
|
||||||
|
"""
|
||||||
|
rh_nom = ""
|
||||||
|
rh_prenom = ""
|
||||||
|
|
||||||
|
|
||||||
|
if( "survey_type" in New_retVal.keys() and New_retVal["survey_type"] == "human_eval" and
|
||||||
|
"related_collection" in New_retVal.keys() and New_retVal["related_collection"] == "ressource_humaine" and
|
||||||
|
"related_collection_id" in New_retVal.keys() and New_retVal["related_collection_id"] ):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rh_data = MYSY_GV.dbname['ressource_humaine'].find_one({'_id':ObjectId(New_retVal["related_collection_id"]),
|
||||||
|
'valide':'1',
|
||||||
|
'locked':'0',
|
||||||
|
'partner_recid':str(my_partner['recid'])}, {'nom':1, "prenom":1})
|
||||||
|
|
||||||
|
|
||||||
|
if(rh_data and "nom" in rh_data.keys()):
|
||||||
|
rh_nom = rh_data['nom']
|
||||||
|
|
||||||
|
if (rh_data and "prenom" in rh_data.keys()):
|
||||||
|
rh_prenom = rh_data['prenom']
|
||||||
|
|
||||||
|
user['rh_nom'] = rh_nom
|
||||||
|
user['rh_prenom'] = rh_prenom
|
||||||
|
|
||||||
val_tmp = val_tmp + 1
|
val_tmp = val_tmp + 1
|
||||||
|
|
||||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||||
|
|
Loading…
Reference in New Issue