10/05/2024 - 18h30
parent
66e3b89695
commit
7d3e9e2270
|
@ -1,15 +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="08/05/2024 - 21h30">
|
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="0dfd">
|
||||||
<change afterPath="$PROJECT_DIR$/Job_Cron.py" afterDir="false" />
|
|
||||||
<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$/Dashbord_queries/factures_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/factures_tbd_qries.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Dashbord_queries/factures_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/factures_tbd_qries.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Dashbord_queries/inscription_tdb_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/inscription_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$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/invoice_paiement_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/invoice_paiement_mgt.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" />
|
|
||||||
</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" />
|
||||||
|
@ -79,13 +76,6 @@
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1680804787304</updated>
|
<updated>1680804787304</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00242" summary="11/03/2024 - 15h">
|
|
||||||
<created>1710165434009</created>
|
|
||||||
<option name="number" value="00242" />
|
|
||||||
<option name="presentableId" value="LOCAL-00242" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1710165434010</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00243" summary="12/03/2024 - 20h30">
|
<task id="LOCAL-00243" summary="12/03/2024 - 20h30">
|
||||||
<created>1710272089417</created>
|
<created>1710272089417</created>
|
||||||
<option name="number" value="00243" />
|
<option name="number" value="00243" />
|
||||||
|
@ -422,7 +412,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1715196233246</updated>
|
<updated>1715196233246</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="291" />
|
<task id="LOCAL-00291" summary="0dfd">
|
||||||
|
<created>1715267879323</created>
|
||||||
|
<option name="number" value="00291" />
|
||||||
|
<option name="presentableId" value="LOCAL-00291" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1715267879324</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="292" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -464,7 +461,6 @@
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="10/04/2024 - 11h50" />
|
|
||||||
<MESSAGE value="10/04/2024 - 22h50" />
|
<MESSAGE value="10/04/2024 - 22h50" />
|
||||||
<MESSAGE value="11/04/2024 - 17h02" />
|
<MESSAGE value="11/04/2024 - 17h02" />
|
||||||
<MESSAGE value="12/04/2024 - 15h05" />
|
<MESSAGE value="12/04/2024 - 15h05" />
|
||||||
|
@ -489,6 +485,7 @@
|
||||||
<MESSAGE value="07/05/2024 - 17h30" />
|
<MESSAGE value="07/05/2024 - 17h30" />
|
||||||
<MESSAGE value="08/05/2024 - 17h30" />
|
<MESSAGE value="08/05/2024 - 17h30" />
|
||||||
<MESSAGE value="08/05/2024 - 21h30" />
|
<MESSAGE value="08/05/2024 - 21h30" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="08/05/2024 - 21h30" />
|
<MESSAGE value="0dfd" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="0dfd" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -835,7 +835,7 @@ def TBD_FACTURE_01_Export_Dashbord_To_Excel(diction):
|
||||||
if ("client_id" in diction.keys() and diction['client_id']):
|
if ("client_id" in diction.keys() and diction['client_id']):
|
||||||
my_new_diction['filter_client_id'] = diction['client_id']
|
my_new_diction['filter_client_id'] = diction['client_id']
|
||||||
|
|
||||||
print(" ### my_new_diction === ", my_new_diction)
|
#print(" ### my_new_diction === ", my_new_diction)
|
||||||
|
|
||||||
local_status, local_retval = Get_Qery_List_Factures_Data_By_Periode(my_new_diction)
|
local_status, local_retval = Get_Qery_List_Factures_Data_By_Periode(my_new_diction)
|
||||||
if (local_status is False):
|
if (local_status is False):
|
||||||
|
@ -1089,6 +1089,109 @@ def TBD_FACTURE_01_Export_Dashbord_To_Excel(diction):
|
||||||
worksheet.write(row, column, no_html)
|
worksheet.write(row, column, no_html)
|
||||||
column += 1
|
column += 1
|
||||||
|
|
||||||
|
if (my_user_dashbord['dashbord_internal_code'] == "tbd_facture_04"):
|
||||||
|
|
||||||
|
# Recuperation des colonne à exporter
|
||||||
|
base_config_dashbord_data = MYSY_GV.dbname['base_config_dashbord'].find_one(
|
||||||
|
{'dashbord_internal_code': str(my_user_dashbord['dashbord_internal_code'])})
|
||||||
|
|
||||||
|
tab_exported_fields = []
|
||||||
|
if ("exported_fields" in base_config_dashbord_data):
|
||||||
|
tab_exported_fields = base_config_dashbord_data['exported_fields']
|
||||||
|
|
||||||
|
# Remettres les dates de filtres en debut de liste
|
||||||
|
if ("filtre_date_fin" in tab_exported_fields):
|
||||||
|
tab_exported_fields.remove("filtre_date_fin")
|
||||||
|
tab_exported_fields.insert(0, "filtre_date_fin")
|
||||||
|
|
||||||
|
if ("filtre_date_debut" in tab_exported_fields):
|
||||||
|
tab_exported_fields.remove("filtre_date_debut")
|
||||||
|
tab_exported_fields.insert(0, "filtre_date_debut")
|
||||||
|
|
||||||
|
tab_exported_fields.insert(0, "date_extraction")
|
||||||
|
|
||||||
|
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||||
|
ts = datetime.now().timestamp()
|
||||||
|
ts = str(ts).replace(".", "").replace(",", "")[-5:]
|
||||||
|
|
||||||
|
orig_file_name = "Export_csv_" + str(my_partner['recid']) + "_" + str(ts) + ".csv"
|
||||||
|
outputFilename = str(MYSY_GV.TEMPORARY_DIRECTORY) + "/" + str(orig_file_name)
|
||||||
|
|
||||||
|
# Create a workbook and add a worksheet.
|
||||||
|
workbook = xlsxwriter.Workbook(outputFilename)
|
||||||
|
worksheet = workbook.add_worksheet()
|
||||||
|
row = 0
|
||||||
|
column = 0
|
||||||
|
|
||||||
|
# Ecrire l'entete
|
||||||
|
for header_item in tab_exported_fields:
|
||||||
|
worksheet.write(row, column, header_item)
|
||||||
|
column += 1
|
||||||
|
|
||||||
|
"""
|
||||||
|
Si dans la requete l'utilisateur a fornir des dates debut, fin et code client, alors
|
||||||
|
on ecrase ce qui a été fait et on replace par les valeurs du diction
|
||||||
|
"""
|
||||||
|
if ("date_from" in diction.keys() and diction['date_from'] and "date_to" in diction.keys() and diction[
|
||||||
|
'date_to']):
|
||||||
|
my_new_diction['periode_start_date'] = diction['date_from']
|
||||||
|
my_new_diction['periode_end_date'] = diction['date_to']
|
||||||
|
|
||||||
|
if ("client_id" in diction.keys() and diction['client_id']):
|
||||||
|
my_new_diction['filter_client_id'] = diction['client_id']
|
||||||
|
|
||||||
|
# print(" ### my_new_diction === ", my_new_diction)
|
||||||
|
|
||||||
|
local_status, local_retval = Get_Qery_List_Facture_Previsionnelle_Data_By_Periode(my_new_diction)
|
||||||
|
if (local_status is False):
|
||||||
|
return local_status, local_retval
|
||||||
|
new_retval_data = local_retval
|
||||||
|
|
||||||
|
print( " ### new_retval_data = ", new_retval_data )
|
||||||
|
|
||||||
|
answers_record_JSON_Data = ast.literal_eval(str(new_retval_data))
|
||||||
|
|
||||||
|
flattened_record = {}
|
||||||
|
for val_tmp in answers_record_JSON_Data:
|
||||||
|
val_tmp_JSON = ast.literal_eval(str(val_tmp))
|
||||||
|
|
||||||
|
for val_tmp2 in val_tmp_JSON['data']:
|
||||||
|
column = 0
|
||||||
|
row = row + 1
|
||||||
|
|
||||||
|
worksheet.write(row, column, str(todays_date))
|
||||||
|
column += 1
|
||||||
|
|
||||||
|
if ("date_from" in diction.keys() and diction['date_from'] and "date_to" in diction.keys() and
|
||||||
|
diction['date_to']):
|
||||||
|
worksheet.write(row, column, str(diction['date_from']))
|
||||||
|
column += 1
|
||||||
|
|
||||||
|
worksheet.write(row, column, str(diction['date_to']))
|
||||||
|
column += 1
|
||||||
|
else:
|
||||||
|
worksheet.write(row, column, str(session_start_date))
|
||||||
|
column += 1
|
||||||
|
|
||||||
|
worksheet.write(row, column, str(session_end_date))
|
||||||
|
column += 1
|
||||||
|
|
||||||
|
for local_fiels in tab_exported_fields:
|
||||||
|
answers_record_JSON = ast.literal_eval(str(val_tmp2))
|
||||||
|
if (str(local_fiels) in answers_record_JSON.keys()):
|
||||||
|
|
||||||
|
local_status, local_retval = mycommon.IsFloat(
|
||||||
|
str(answers_record_JSON[str(local_fiels)]).strip())
|
||||||
|
|
||||||
|
no_html = ""
|
||||||
|
if (local_status is True):
|
||||||
|
no_html = answers_record_JSON[str(local_fiels)]
|
||||||
|
else:
|
||||||
|
no_html = mycommon.cleanhtml(answers_record_JSON[str(local_fiels)])
|
||||||
|
|
||||||
|
worksheet.write(row, column, no_html)
|
||||||
|
column += 1
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
|
@ -1553,15 +1656,23 @@ def Get_Qery_List_Facture_Previsionnelle_Data_By_Periode(diction):
|
||||||
|
|
||||||
local_node['ca_previsionnel'] = str(ca_prev)
|
local_node['ca_previsionnel'] = str(ca_prev)
|
||||||
|
|
||||||
tmp['list_session'].append(local_node)
|
#tmp['list_session'].append(local_node)
|
||||||
ca_month_previsionnel = ca_month_previsionnel + ca_prev
|
ca_month_previsionnel = ca_month_previsionnel + ca_prev
|
||||||
|
|
||||||
data['ca_month_previsionnel'] = str(ca_month_previsionnel)
|
data['ca_month_previsionnel'] = mycommon.tryFloat(str(ca_month_previsionnel))
|
||||||
|
|
||||||
print(" ### range_date_month = ", range_date_month)
|
|
||||||
|
|
||||||
|
|
||||||
|
final_data = {}
|
||||||
|
final_data['data'] = range_date_month
|
||||||
|
final_data['axis_data'] = []
|
||||||
|
final_data['series_TotalAmount_data'] = []
|
||||||
|
|
||||||
|
#print(" ### final_data = ", final_data)
|
||||||
|
|
||||||
RetObject = []
|
RetObject = []
|
||||||
RetObject.append(mycommon.JSONEncoder().encode(range_date_month))
|
RetObject.append(mycommon.JSONEncoder().encode(final_data))
|
||||||
|
|
||||||
return True, RetObject
|
return True, RetObject
|
||||||
|
|
||||||
|
|
|
@ -841,11 +841,11 @@ def Get_Qery_Inscription_Group_By_Class(diction):
|
||||||
json_retval['data'] = my_data
|
json_retval['data'] = my_data
|
||||||
json_retval['axis_data'] = axis_data
|
json_retval['axis_data'] = axis_data
|
||||||
|
|
||||||
print(" ### json_retval Groupe by class = ", json_retval)
|
#print(" ### json_retval Groupe by class = ", json_retval)
|
||||||
|
|
||||||
RetObject.append(mycommon.JSONEncoder().encode(json_retval))
|
RetObject.append(mycommon.JSONEncoder().encode(json_retval))
|
||||||
|
|
||||||
print(" ### json_retval Groupe by class = ", RetObject)
|
#print(" ### json_retval Groupe by class = ", RetObject)
|
||||||
|
|
||||||
return True, RetObject
|
return True, RetObject
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
11920
Log/log_file.log
11920
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -789,7 +789,13 @@ def Get_Invoice_Total_Amount_Payed_And_Remaining_Amount(diction):
|
||||||
|
|
||||||
remain_amount = total_header_toutes_taxes_float - payed_amount
|
remain_amount = total_header_toutes_taxes_float - payed_amount
|
||||||
|
|
||||||
total_node = {"total_amount":str(total_header_toutes_taxes_float), "payed_amount":str(payed_amount), "remaining_amount":str(remain_amount) }
|
payed_amount_str = str(payed_amount)
|
||||||
|
if( payed_amount == 0 ):
|
||||||
|
payed_amount_str = "0.0"
|
||||||
|
|
||||||
|
total_node = {"total_amount":str(total_header_toutes_taxes_float), "payed_amount":str(payed_amount_str), "remaining_amount":str(remain_amount) }
|
||||||
|
|
||||||
|
#print(" ### total_node = ",total_node)
|
||||||
|
|
||||||
RetObject.append(mycommon.JSONEncoder().encode(total_node))
|
RetObject.append(mycommon.JSONEncoder().encode(total_node))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue