26/04/26 - 19h

Signed-off-by: Cherif <cbalde@mysy-training.com>
master_Elyos_FI
Cherif 2026-04-26 19:25:27 +02:00
parent a34f87a5e5
commit 1ffde079fa
6 changed files with 11525 additions and 54 deletions

View File

@ -4,12 +4,12 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="21/04/2026 - 21h30">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="24/04/26 - 19h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Activite.py" beforeDir="false" afterPath="$PROJECT_DIR$/Activite.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$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/note_evaluation_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/note_evaluation_mgt.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$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/partner_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -454,7 +454,7 @@
<option name="project" value="LOCAL" />
<updated>1747251650255</updated>
</task>
<option name="localTasksCounter" value="566" />
<option name="localTasksCounter" value="567" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -496,7 +496,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="27/02/26 - 19h30" />
<MESSAGE value="28/02/26 - 22h" />
<MESSAGE value="28/02/26 - 23h" />
<MESSAGE value="01/03/26 - 13h30" />
@ -521,6 +520,7 @@
<MESSAGE value="20/04/2026 - 20h30" />
<MESSAGE value="21/04/2026 - 11h30" />
<MESSAGE value="21/04/2026 - 21h30" />
<option name="LAST_COMMIT_MESSAGE" value="21/04/2026 - 21h30" />
<MESSAGE value="24/04/26 - 19h" />
<option name="LAST_COMMIT_MESSAGE" value="24/04/26 - 19h" />
</component>
</project>

View File

@ -46,7 +46,7 @@ def Add_activite(diction):
"""
field_list = ['token', "description", "detail", "deadline", "type",
"status", 'related_collection', 'related_collection_owner_email',
'employee_assigned_to_id']
'employee_assigned_to_id', 'importance']
incom_keys = diction.keys()
for val in incom_keys:
@ -136,6 +136,12 @@ def Add_activite(diction):
data['description'] = diction['description']
if( "importance" in diction.keys()):
data['importance'] = diction['importance']
else:
data['importance'] = ""
detail = ""
if ("detail" in diction.keys()):
if diction['detail']:
@ -152,15 +158,15 @@ def Add_activite(diction):
deadline = ""
if ("deadline" in diction.keys()):
if diction['deadline']:
deadline = diction['deadline']
data['deadline'] = diction['deadline']
deadline = diction['deadline'][0:16]
data['deadline'] = diction['deadline'][0:16]
local_status = mycommon.CheckisDate(deadline)
local_status = mycommon.CheckisDate_Hours(deadline)
if (local_status is False):
mycommon.myprint(
str(inspect.stack()[0][3]) + " - La date deadline n'est pas au format jj/mm/aaaa ")
str(inspect.stack()[0][3]) + " - La date deadline n'est pas au format jj/mm/aaaa hh:mm ")
return False, " - La date deadline n'est pas au format jj/mm/aaaa "
return False, " - La date deadline n'est pas au format jj/mm/aaaa hh:mm "
@ -260,7 +266,7 @@ def Update_activite(diction):
Verification des input acceptés
"""
field_list = ['token', "description", "detail", "deadline", "type",
"status",'activite_recid' , 'employee_assigned_to_id']
"status",'activite_recid' , 'employee_assigned_to_id', 'importance']
incom_keys = diction.keys()
@ -343,12 +349,18 @@ def Update_activite(diction):
description = diction['description']
data_update['description'] = diction['description']
if (len(str(description)) > 255):
mycommon.myprint(
str(inspect.stack()[0][3]) + " - Le champ 'description' doit faire moins de 255 caractères ")
return False, " - Le champ 'description' doit faire moins de 255 caractères "
if ("importance" in diction.keys()):
data_update['importance'] = diction['importance']
detail = ""
if ("detail" in diction.keys()):
detail = diction['detail']
@ -363,15 +375,15 @@ def Update_activite(diction):
deadline = ""
if ("deadline" in diction.keys()):
if diction['deadline']:
deadline = diction['deadline']
data_update['deadline'] = diction['deadline']
deadline = diction['deadline'][0:16]
data_update['deadline'] = diction['deadline'][0:16]
local_status = mycommon.CheckisDate(deadline)
local_status = mycommon.CheckisDate_Hours(deadline)
if (local_status is False):
mycommon.myprint(
str(inspect.stack()[0][3]) + " - La date deadline n'est pas au format jj/mm/aaaa ")
str(inspect.stack()[0][3]) + " - La date deadline n'est pas au format jj/mm/aaaa hh:mm")
return False, " - La date deadline n'est pas au format jj/mm/aaaa "
return False, " - La date deadline n'est pas au format jj/mm/aaaa hh:mm"
employee_assigned_to_id = ""
if ("employee_assigned_to_id" in diction.keys()):
@ -531,8 +543,6 @@ def Update_activite_status(diction):
Recuperation des données fournies en entrée
"""
status = ""
if ("status" in diction.keys()):
status = diction['status']
@ -686,10 +696,10 @@ def Get_List_Entity_Activite(diction):
retard = 0
# On analyse le retard que sur les activité en cours , pas celles annulées ou faite
if( "deadline" in retval.keys() and retval['status'] == "0"):
local_status = mycommon.CheckisDate(retval['deadline'])
local_status = mycommon.CheckisDate_Hours(str(retval['deadline'])[0:16])
if( local_status is not False ):
mytoday = datetime.today().strftime("%d/%m/%Y")
retard = (datetime.strptime(str(retval['deadline']), '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
retard = (datetime.strptime(str(retval['deadline'])[0:10], '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
if (retard < 0):
nb_activite_en_retard = nb_activite_en_retard + 1
@ -699,6 +709,9 @@ def Get_List_Entity_Activite(diction):
if("employee_assigned_view_statut" not in user.keys() ):
user['employee_assigned_view_statut'] = ""
if ("importance" not in user.keys()):
user['importance'] = ""
val_tmp = val_tmp + 1
RetObject.append(mycommon.JSONEncoder().encode(user))
@ -798,10 +811,10 @@ def Get_List_Activite_Assign_To(diction):
retard = 0
# On analyse le retard que sur les activité en cours , pas celles annulées ou faite
if( "deadline" in retval.keys() and retval['status'] == "0"):
local_status = mycommon.CheckisDate(retval['deadline'])
local_status = mycommon.CheckisDate_Hours(retval['deadline'])
if( local_status is not False ):
mytoday = datetime.today().strftime("%d/%m/%Y")
retard = (datetime.strptime(str(retval['deadline']), '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
retard = (datetime.strptime(str(retval['deadline'][0:10]), '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
if (retard < 0):
nb_activite_en_retard = nb_activite_en_retard + 1
@ -810,6 +823,30 @@ def Get_List_Activite_Assign_To(diction):
if( "employee_assigned_view_statut" not in user.keys() ):
user['employee_assigned_view_statut'] = "0"
if ("importance" not in user.keys()):
user['importance'] = ""
# Si le champ 'employee_assigned_to_id' alors on va chercher le nom et prenom de l'employe au quel est assigné la tache (employe)
if ('employee_assigned_to_id' in retval.keys() and retval['employee_assigned_to_id']):
Employee_data = MYSY_GV.dbname['ressource_humaine'].find_one(
{'_id': ObjectId(str(retval['employee_assigned_to_id'])), 'valide': '1', 'locked': '0',
'partner_recid': str(my_partner['recid'])})
employee_assigned_to_nom_prenom = ""
employee_assigned_to_initiale = ""
if (Employee_data and 'nom' in Employee_data.keys()):
employee_assigned_to_nom_prenom = str(Employee_data['nom'])
employee_assigned_to_initiale = str(Employee_data['nom'])[0]
if (Employee_data and 'prenom' in Employee_data.keys()):
employee_assigned_to_nom_prenom = str(employee_assigned_to_nom_prenom) + " " + str(
Employee_data['prenom'])
employee_assigned_to_initiale = str(employee_assigned_to_initiale) + " " +str(Employee_data['prenom'])[0]
user['employee_assigned_to_nom_prenom'] = str(employee_assigned_to_nom_prenom)
user['employee_assigned_to_initiale'] = employee_assigned_to_initiale
val_tmp = val_tmp + 1
RetObject.append(mycommon.JSONEncoder().encode(user))
@ -893,10 +930,10 @@ def Get_Nb_Entity_Activite_Assign_To_Me_En_Retard(diction):
retard = 0
if( "deadline" in retval.keys() and retval['status'] == "0" ):
local_status = mycommon.CheckisDate(retval['deadline'])
local_status = mycommon.CheckisDate_Hours(str(retval['deadline'])[0:16])
if( local_status is not False ):
mytoday = datetime.today().strftime("%d/%m/%Y")
retard = (datetime.strptime(str(retval['deadline']), '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
retard = (datetime.strptime(str(retval['deadline'])[0:10], '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
if( retard < 0 ):
@ -967,10 +1004,10 @@ def Get_Nb_Entity_Activite_Assigne_To_Me_En_Retard_No_token(diction):
retard = 0
if( "deadline" in retval.keys() and retval['status'] == "0"):
local_status = mycommon.CheckisDate(retval['deadline'])
local_status = mycommon.CheckisDate_Hours(str(retval['deadline'])[0:16])
if( local_status is not False ):
mytoday = datetime.today().strftime("%d/%m/%Y")
retard = (datetime.strptime(str(retval['deadline']), '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
retard = (datetime.strptime(str(retval['deadline'])[0:10], '%d/%m/%Y') - datetime.strptime(str(mytoday), '%d/%m/%Y')).days
if( retard < 0 ):
nb_activite_en_retard = nb_activite_en_retard + 1
@ -1134,14 +1171,19 @@ def Get_Given_Activite(diction):
'partner_recid': str(my_partner['recid'])})
employee_assigned_to_nom_prenom = ""
employee_assigned_to_initiale = ""
if (Employee_data and 'nom' in Employee_data.keys()):
employee_assigned_to_nom_prenom = str(Employee_data['nom'])
employee_assigned_to_initiale = str(Employee_data['nom'])[0]
if (Employee_data and 'prenom' in Employee_data.keys()):
employee_assigned_to_nom_prenom = str(employee_assigned_to_nom_prenom) + " " + str(
Employee_data['prenom'])
employee_assigned_to_initiale = str(employee_assigned_to_initiale) + " " + \
str(Employee_data['prenom'])[0]
user['employee_assigned_to_nom_prenom'] = str(employee_assigned_to_nom_prenom)
user['employee_assigned_to_initiale'] = employee_assigned_to_initiale

File diff suppressed because one or more lines are too long

View File

@ -202,7 +202,7 @@ def Add_Invoice_Paiement(diction):
if( total_relicat < 0 ):
mycommon.myprint(
str(inspect.stack()[0][3]) + " Le montant du "+str(total_relicat)+" est supérieur au montant payé "+str(total_payed_amount_float))
return False, " Le montant du "+str(total_relicat)+" est supérieur au montant payé "+str(total_payed_amount_float)
#return False, " Le montant du "+str(total_relicat)+" est supérieur au montant payé "+str(total_payed_amount_float)
"""

View File

@ -7646,6 +7646,7 @@ def GerneratePDF_Partner_Invoice_regeneration(token, invoice_id):
payload['token'] = str(token)
payload['invoice_id'] = str(invoice_id)
payload['invoice_regeneration'] = "1"
payload['invoice_aquite'] = "1"
print(" ### GerneratePDF_Partner_Invoice : payload = ",str(payload))

View File

@ -2132,27 +2132,85 @@ def Get_List_Partner_Invoice_no_filter(diction):
]
#print(" ### orders new_myquery_find_invoice = ", new_myquery_find_invoice)
print(" ### orders new_myquery_find_invoice = ", new_myquery_find_invoice)
RetObject = []
val_tmp = 0
todays_date = str(date.today().strftime("%d/%m/%Y"))
todays_date_ISO_Date = datetime.strptime(str(todays_date).strip(), '%d/%m/%Y')
somme_header_ca_ht = 0
somme_header_ca_ttc = 0
nb_header_invoice = 0
nb_header_invoice_bouillon = 0
# montant factures non échu => du_date non depassé
total_a_payer = 0
# montant en retard => du_date dépassée
total_en_retard = 0
for New_retVal in MYSY_GV.dbname['partner_invoice_header'].aggregate(new_myquery_find_invoice):
user = New_retVal
user['id'] = str(val_tmp)
val_tmp = val_tmp + 1
if( "reste_to_paye" not in New_retVal.keys()):
user['reste_to_paye'] = New_retVal['total_header_toutes_taxes']
#### icicici
"""
recuperer le CA globale et le nombre de factures
"""
if ("total_header_hors_taxe_before_header_reduction" in New_retVal.keys()):
somme_header_ca_ht = somme_header_ca_ht + mycommon.tryFloat( str(New_retVal['total_header_hors_taxe_before_header_reduction']))
if ("status" in user.keys() and user['status'] == "0"):
nb_header_invoice_bouillon = nb_header_invoice_bouillon + 1
elif ("total_header_hors_taxe_before_header_reduction" in user.keys() and "total_header_toutes_taxes" in user.keys()):
somme_header_ca_ht = somme_header_ca_ht + mycommon.tryFloat(str(user['total_header_hors_taxe_before_header_reduction']))
somme_header_ca_ttc = somme_header_ca_ttc + mycommon.tryFloat(str(user['total_header_toutes_taxes']))
nb_header_invoice = nb_header_invoice + 1
"""
Recuperation du montant des facture echue (donc en retard)
"""
if (mycommon.CheckisDate(New_retVal['invoice_date_echeance'])):
mysy_invoice_du_date_ISO_Date = datetime.strptime(str(New_retVal['invoice_date_echeance']),
"%d/%m/%Y")
#print(" CMP = "+str(todays_date_ISO_Date)+" VS "+str(mysy_invoice_du_date_ISO_Date) )
if (todays_date_ISO_Date > mysy_invoice_du_date_ISO_Date and mycommon.tryFloat(str(user['reste_to_paye'])) > 0):
total_en_retard = total_en_retard + mycommon.tryFloat(str(user['reste_to_paye']))
#print(" RETARDD : ", str(user['total_header_toutes_taxes']), str(user['invoice_header_ref_interne']))
user['eye_status'] = "retard"
user['eye_echeance'] = "-1"
else:
# print(" CMP = " + str(todays_date_ISO_Date) + " VS " + str(mysy_invoice_du_date_ISO_Date))
total_a_payer = total_a_payer + mycommon.tryFloat(str(user['reste_to_paye']))
#print(" A PAYER ", str(user['total_header_toutes_taxes']), str(user['invoice_header_ref_interne']))
user['eye_status'] = "a_payer"
"""
On pour mettre en orange les facture qui arrive à échance cette semaine, on va ajouter un statut
"""
nb_jour_avant_echeance = mysy_invoice_du_date_ISO_Date - todays_date_ISO_Date
# print(" ### nb_jour_avant_echeance = ", nb_jour_avant_echeance.days)
user['eye_echeance'] = str(nb_jour_avant_echeance.days)
else:
total_a_payer = total_a_payer + mycommon.tryFloat(str(user['reste_to_paye']))
#print(" NOOO invoice_date_echeance => A PAYER ", str(user['total_header_toutes_taxes']))
user['eye_status'] = "a_payer"
# Convertir la date facture en jj/mm/aaaa
if( 'invoice_date' in New_retVal.keys()):
date_jjmmaaa = str(New_retVal['invoice_date'])[0:10]
@ -2224,17 +2282,19 @@ def Get_List_Partner_Invoice_no_filter(diction):
RetObject.append(mycommon.JSONEncoder().encode(user))
total_data = []
node = {}
node['somme_header_ca_ht'] = str(somme_header_ca_ht)
node['somme_header_ca_ht'] = str(round(somme_header_ca_ht, 2))
node['nb_header_invoice'] = str(nb_header_invoice)
node['nb_header_invoice_bouillon'] = str(nb_header_invoice_bouillon)
node['total_a_payer'] = str(round(total_a_payer, 2))
node['total_en_retard'] = str(round(total_en_retard, 2))
total_data.append(node)
total_data = mycommon.JSONEncoder().encode(total_data)
#print(" ### RetObject = ", RetObject)
print(" ### total_data = ", total_data)
return True, RetObject, total_data
@ -2648,22 +2708,26 @@ def Get_List_Partner_Invoice_with_filter(diction):
3]) + " La date de fin (filtre) n'est pas au format 'jj/mm/aaaa' ")
return False, " La date de fin (filtre) n'est pas au format 'jj/mm/aaaa'", False
todays_date = str(date.today().strftime("%d/%m/%Y"))
todays_date_ISO_Date = datetime.strptime(str(todays_date).strip(), '%d/%m/%Y')
somme_header_ca_ht = 0
somme_header_ca_ttc = 0
nb_header_invoice = 0
nb_header_invoice_bouillon = 0
# montant factures non échu => du_date non depassé
total_a_payer = 0
# montant en retard => du_date dépassée
total_en_retard = 0
for New_retVal in MYSY_GV.dbname['partner_invoice_header'].aggregate(new_myquery_find_order):
"""
recuperer le CA globale et le nombre de factures
"""
if("total_header_hors_taxe_before_header_reduction" in New_retVal.keys() ):
somme_header_ca_ht = somme_header_ca_ht + mycommon.tryFloat(str(New_retVal['total_header_hors_taxe_before_header_reduction']))
nb_header_invoice = nb_header_invoice + 1
if ('partner_invoice_line_collection' in New_retVal.keys() and len( New_retVal['partner_invoice_line_collection']) > 0):
user = New_retVal
# Si le champ 'order_header_condition_paiement_id' alors on va chercher le code de la condition de paiement
paiement_ction_code = ""
if ('order_header_condition_paiement_id' in New_retVal.keys() and New_retVal[
@ -2702,9 +2766,11 @@ def Get_List_Partner_Invoice_with_filter(diction):
user['order_header_vendeur_nom_prenom'] = str(order_header_vendeur_nom_prenom)
"""
Recuperer le solde (montant restant à payer)
"""
Recuperer le solde (montant restant à payer)
"""
local_diction = {'token': str(diction['token']), 'invoice_id': str(New_retVal['_id'])}
reste_to_paye = "0"
@ -2722,8 +2788,59 @@ def Get_List_Partner_Invoice_with_filter(diction):
if ("invoice_header_origin" not in New_retVal.keys()):
user['invoice_header_origin'] = ""
#### icicici
"""
recuperer le CA globale et le nombre de factures
"""
if ("status" in New_retVal.keys() and New_retVal['status'] == "0"):
nb_header_invoice_bouillon = nb_header_invoice_bouillon + 1
elif ("total_header_hors_taxe_before_header_reduction" in New_retVal.keys() and "total_header_toutes_taxes" in New_retVal.keys()):
somme_header_ca_ht = somme_header_ca_ht + mycommon.tryFloat(str(New_retVal['total_header_hors_taxe_before_header_reduction']))
somme_header_ca_ttc = somme_header_ca_ttc + mycommon.tryFloat(str(New_retVal['total_header_toutes_taxes']))
nb_header_invoice = nb_header_invoice + 1
"""
Recuperation du montant des facture echue (donc en retard)
"""
if (mycommon.CheckisDate(New_retVal['invoice_date_echeance'])):
mysy_invoice_du_date_ISO_Date = datetime.strptime(str(New_retVal['invoice_date_echeance']),
"%d/%m/%Y")
#print(" CMP = "+str(todays_date_ISO_Date)+" VS "+str(mysy_invoice_du_date_ISO_Date) )
if (todays_date_ISO_Date > mysy_invoice_du_date_ISO_Date and mycommon.tryFloat(str(user['reste_to_paye'])) > 0):
total_en_retard = total_en_retard + mycommon.tryFloat(str(user['reste_to_paye']))
#print(" RETARDD : ", str(New_retVal['total_header_toutes_taxes']))
user['eye_status'] = "retard"
user['eye_echeance'] = "-1"
else:
# print(" CMP = " + str(todays_date_ISO_Date) + " VS " + str(mysy_invoice_du_date_ISO_Date))
total_a_payer = total_a_payer + mycommon.tryFloat(str(user['reste_to_paye']))
#print(" A PAYER ", str(New_retVal['total_header_toutes_taxes']))
user['eye_status'] = "a_payer"
"""
On pour mettre en orange les facture qui arrive à échance cette semaine, on va ajouter un statut
"""
nb_jour_avant_echeance = mysy_invoice_du_date_ISO_Date - todays_date_ISO_Date
# print(" ### nb_jour_avant_echeance = ", nb_jour_avant_echeance.days)
user['eye_echeance'] = str(nb_jour_avant_echeance.days)
else:
total_a_payer = total_a_payer + mycommon.tryFloat(str(user['reste_to_paye']))
#print(" NOOO invoice_date_echeance => A PAYER ", str(New_retVal['total_header_toutes_taxes']))
user['eye_status'] = "a_payer"
if( filter_date_debut and filter_date_fin ):
if ( datetime.strptime(str(New_retVal['invoice_date'])[0:10], '%d/%m/%Y') >= datetime.strptime(str(filter_date_debut)[0:10], '%d/%m/%Y') and
datetime.strptime(str(New_retVal['invoice_date'])[0:10], '%d/%m/%Y') <= datetime.strptime(str(filter_date_fin)[0:10], '%d/%m/%Y') ):
@ -2796,12 +2913,18 @@ def Get_List_Partner_Invoice_with_filter(diction):
total_data = []
node = {}
node['somme_header_ca_ht'] = str(somme_header_ca_ht)
node['somme_header_ca_ht'] = str(round(somme_header_ca_ht, 2))
node['somme_header_ca_ttc'] = str(round(somme_header_ca_ttc, 2))
node['nb_header_invoice'] = str(nb_header_invoice)
node['nb_header_invoice_bouillon'] = str(nb_header_invoice_bouillon)
node['total_a_payer'] = str(round(total_a_payer, 2))
node['total_en_retard'] = str(round(total_en_retard, 2))
total_data.append(node)
total_data = mycommon.JSONEncoder().encode(total_data)
#print(" #### nb_result = ", val_tmp)
print(" #### total_data = ", total_data)
return True, RetObject, total_data
@ -3188,11 +3311,15 @@ Si invoice_regeneration = "1", alors on imprime une facture à la volée, on ne
Dans le modele de facture, on va mettre une condiction dans le template:
- si regelement existe alors on va afficher les reglement
25/04/26 :
- invoice_aquite = 1, alors on imprime la facture aquitée ave le reglement,
si non, pas d'affichage du reglement et aquitement
"""
def GerneratePDF_Partner_Invoice(diction):
try:
field_list = ['invoice_id', 'token', 'invoice_regeneration' ]
field_list = ['invoice_id', 'token', 'invoice_regeneration', 'invoice_aquite' ]
incom_keys = diction.keys()
for val in incom_keys:
if val not in field_list and val.startswith('my_') is False:
@ -3246,6 +3373,10 @@ def GerneratePDF_Partner_Invoice(diction):
if( "invoice_regeneration" in diction.keys() and diction['invoice_regeneration'] == "1"):
invoice_regeneration = "1"
invoice_aquite = "0"
if ("invoice_aquite" in diction.keys() and diction['invoice_aquite'] == "1"):
invoice_aquite = "1"
"""
06/12/205 -
Si invoice_regeneration == "1", on alors on va regenerer la facture sur le modele de document
@ -3757,6 +3888,7 @@ def GerneratePDF_Partner_Invoice(diction):
convention_dictionnary_data['order_header'] = Order_header_data
convention_dictionnary_data['order_lines'] = Order_header_lines_data
convention_dictionnary_data['invoice_paiement_data'] = invoice_paiement_data
convention_dictionnary_data['invoice_aquite'] = invoice_aquite
# read css file
css_file = "./css_document/elyos_css.css"
@ -3810,10 +3942,14 @@ Si invoice_regeneration = "1", alors on imprime une facture à la volée, on ne
Dans le modele de facture, on va mettre une condiction dans le template:
- si regelement existe alors on va afficher les reglement
25/04/26 :
- invoice_aquite = 1, alors on imprime la facture aquitée ave le reglement,
si non, pas d'affichage du reglement et aquitement
"""
def Send_Partner_Invoice_By_Email(tab_files, Folder, diction):
try:
field_list = ['invoice_id', 'token', 'invoice_regeneration' ]
field_list = ['invoice_id', 'token', 'invoice_regeneration' , 'invoice_aquite']
incom_keys = diction.keys()
for val in incom_keys:
if val not in field_list and val.startswith('my_') is False:
@ -3868,8 +4004,9 @@ def Send_Partner_Invoice_By_Email(tab_files, Folder, diction):
if( "invoice_regeneration" in diction.keys() and diction['invoice_regeneration'] == "1"):
invoice_regeneration = "1"
invoice_aquite = "0"
if ("invoice_aquite" in diction.keys() and diction['invoice_aquite'] == "1"):
invoice_aquite = "1"
partner_document_INVOICE_data_qry = {'partner_owner_recid': str(my_partner['recid']),
'valide': '1', 'locked': '0', 'ref_interne': 'PART_INVOICE', 'type_doc':'email'}
@ -4355,6 +4492,7 @@ def Send_Partner_Invoice_By_Email(tab_files, Folder, diction):
convention_dictionnary_data['order_header'] = Order_header_data
convention_dictionnary_data['order_lines'] = Order_header_lines_data
convention_dictionnary_data['invoice_paiement_data'] = invoice_paiement_data
convention_dictionnary_data['invoice_aquite'] = invoice_aquite
#print(" ############ convention_dictionnary_data = ", convention_dictionnary_data)