25/04/2024 - 19h

master
cherif 2024-04-25 19:06:48 +02:00
parent 7e16b18f09
commit 514c31033d
6 changed files with 9273 additions and 17 deletions

View File

@ -1,12 +1,12 @@
<?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="22/04/2024 - 17h30">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="23/04/2024 - 14h06">
<change afterPath="$PROJECT_DIR$/Dashbord_queries/factures_tbd_qries.py" 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$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dashbord_queries/common_tdb_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/common_tdb_qries.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$/attached_file_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/attached_file_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partner_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -77,13 +77,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00227" summary="25/02/2024 - 22h30">
<created>1708898791231</created>
<option name="number" value="00227" />
<option name="presentableId" value="LOCAL-00227" />
<option name="project" value="LOCAL" />
<updated>1708898791231</updated>
</task>
<task id="LOCAL-00228" summary="26/02/2024 - 11h30">
<created>1708944824618</created>
<option name="number" value="00228" />
@ -420,7 +413,14 @@
<option name="project" value="LOCAL" />
<updated>1713799833126</updated>
</task>
<option name="localTasksCounter" value="276" />
<task id="LOCAL-00276" summary="23/04/2024 - 14h06">
<created>1713874032440</created>
<option name="number" value="00276" />
<option name="presentableId" value="LOCAL-00276" />
<option name="project" value="LOCAL" />
<updated>1713874032440</updated>
</task>
<option name="localTasksCounter" value="277" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -462,7 +462,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="26/03/2024 - 21h30" />
<MESSAGE value="fff" />
<MESSAGE value="01/04/24 - 23h30" />
<MESSAGE value="01/04/24 - 23h50" />
@ -487,6 +486,7 @@
<MESSAGE value="20/04/2024 - 20h44" />
<MESSAGE value="sss" />
<MESSAGE value="22/04/2024 - 17h30" />
<option name="LAST_COMMIT_MESSAGE" value="22/04/2024 - 17h30" />
<MESSAGE value="23/04/2024 - 14h06" />
<option name="LAST_COMMIT_MESSAGE" value="23/04/2024 - 14h06" />
</component>
</project>

View File

@ -300,6 +300,8 @@ def Get_Connected_User_List_Dashbord(diction):
qry = {'valide':"1", 'locked':'0','partner_owner_recid':str(my_partner['recid']),'connected_id':str(my_partner['_id'])}
print(" ### qry = ", qry)
for retval in MYSY_GV.dbname['user_dashbord'].find( qry):
@ -344,8 +346,8 @@ def Get_Connected_User_List_Dashbord(diction):
retval['start_date'] = start_date
retval['end_date'] = end_date
print(" ### final retval = ", retval)
RetObject.append(mycommon.JSONEncoder().encode(retval))
#print(" ### final retval = ", retval)
RetObject.append(mycommon.JSONEncoder().encode(retval))
return True, RetObject

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

73
main.py
View File

@ -67,7 +67,7 @@ import Dashbord_queries.common_tdb_qries as common_tdb_qries
import Dashbord_queries.formation_tbd_qries as formation_tbd_qries
import Dashbord_queries.ressources_humaines_tbd_qries as ressources_humaines_tbd_qries
import Dashbord_queries.inscription_tdb_qries as inscription_tdb_qries
import Dashbord_queries.factures_tbd_qries as factures_tbd_qries
import Collection_Historique as Collection_Historique
import purchase_prices as purchase_prices
@ -8495,6 +8495,77 @@ def Export_To_Excel_Survey_with_filter(token, session_id, formulaire_type):
"""
API / TBD / QRY : Recuperation des factures sur une periode
"""
@app.route('/myclass/api/Get_Qery_List_Factures_Data_By_Periode/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Qery_List_Factures_Data_By_Periode():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Qery_List_Factures_Data_By_Periode payload = ",payload)
status, retval = factures_tbd_qries.Get_Qery_List_Factures_Data_By_Periode(payload)
return jsonify(status=status, message=retval)
"""
API / TBD / QRY : Recuperation des factures sur une periode PAR CLIENT
"""
@app.route('/myclass/api/Get_Qery_List_Factures_Data_By_Client_Periode/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Qery_List_Factures_Data_By_Client_Periode():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Qery_List_Factures_Data_By_Client_Periode payload = ",payload)
status, retval = factures_tbd_qries.Get_Qery_List_Factures_Data_By_Client_Periode(payload)
return jsonify(status=status, message=retval)
"""
API / TBD / QRY : Recuperation des DEVIS
"""
@app.route('/myclass/api/Get_Qery_List_Quotation_Data_By_Periode/', methods=['POST','GET'])
@crossdomain(origin='*')
def Get_Qery_List_Quotation_Data_By_Periode():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### Get_Qery_List_Quotation_Data_By_Periode payload = ",payload)
status, retval = factures_tbd_qries.Get_Qery_List_Quotation_Data_By_Periode(payload)
return jsonify(status=status, message=retval)
"""
API / TBD / EXPORT EXCEL : Export excel des resultats des tbd
"""
@app.route('/myclass/api/TBD_FACTURE_01_Export_Dashbord_To_Excel/<token>/<user_dashbord_id>/<date_from>/<date_to>/<client_id>/', methods=['POST','GET'])
@crossdomain(origin='*')
def TBD_FACTURE_01_Export_Dashbord_To_Excel(token, user_dashbord_id, date_from, date_to, client_id):
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
payload = {}
payload['token'] = str(token)
payload['user_dashbord_id'] = str(user_dashbord_id)
payload['date_from'] = str(date_from).replace("-", "/")
payload['date_to'] = str(date_to).replace("-", "/")
payload['client_id'] = str(client_id).replace("-", "")
print(" ### TBD_FACTURE_01_Export_Dashbord_To_Excel payload = ",payload)
status, retval = factures_tbd_qries.TBD_FACTURE_01_Export_Dashbord_To_Excel(payload)
if(status ):
return retval
else:
return False
if __name__ == '__main__':
print(" debut api")
context = SSL.Context(SSL.SSLv23_METHOD)

View File

@ -5790,6 +5790,7 @@ def Insert_Quotation_To_Session(diction):
update_data['update_by'] = str(my_partner['_id'])
update_data['date_validation'] = now
update_data['date_reservation'] = now
update_data['is_validated'] = "1"
update_data['mode_reservation'] = "automatique"
update_data['validation_by'] = str(my_partner['_id'])
update_data['reservation_by'] = str(my_partner['_id'])
@ -6120,6 +6121,7 @@ def Insert_Quotation_To_Session_From_Partner_Owner_Recid(diction):
update_data['update_by'] = "client"
update_data['date_validation'] = now
update_data['date_reservation'] = now
update_data['is_validated'] = "1"
update_data['mode_reservation'] = "automatique"
update_data['validation_by'] = "client"
update_data['reservation_by'] = "client"