dqsdqss
parent
57e5e08b83
commit
c09423538a
|
@ -1,13 +1,21 @@
|
|||
<?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="14/07/2024 - 22h">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="dqsdqs">
|
||||
<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$/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$/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$/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_order.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_order.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partner_produit_service_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_produit_service_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$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -77,13 +85,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00303" summary="17/05/2024 - 21h30">
|
||||
<created>1715973566772</created>
|
||||
<option name="number" value="00303" />
|
||||
<option name="presentableId" value="LOCAL-00303" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1715973566773</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00304" summary="sdf">
|
||||
<created>1716053773665</created>
|
||||
<option name="number" value="00304" />
|
||||
|
@ -420,7 +421,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1720990126140</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="352" />
|
||||
<task id="LOCAL-00352" summary="dqsdqs">
|
||||
<created>1721069603829</created>
|
||||
<option name="number" value="00352" />
|
||||
<option name="presentableId" value="LOCAL-00352" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1721069603830</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="353" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -462,7 +470,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="05/06/2024 - 23h" />
|
||||
<MESSAGE value="06/06/2024 - 12h" />
|
||||
<MESSAGE value="06/06/2024 - 20h" />
|
||||
<MESSAGE value="07/06/2024 - 22h30" />
|
||||
|
@ -487,6 +494,7 @@
|
|||
<MESSAGE value="11/07/2024 - 13h14" />
|
||||
<MESSAGE value="13/07/2024 - 22h" />
|
||||
<MESSAGE value="14/07/2024 - 22h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="14/07/2024 - 22h" />
|
||||
<MESSAGE value="dqsdqs" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="dqsdqs" />
|
||||
</component>
|
||||
</project>
|
|
@ -650,13 +650,13 @@ Signature du document 'normale'
|
|||
def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
||||
try:
|
||||
|
||||
print(" GRR diction = ", diction)
|
||||
#print(" GRR diction = ", diction)
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'e_doc_id', 'secret_key_signature', 'email_destinataire', 'user_ip' ]
|
||||
field_list = ['token', 'e_doc_id', 'secret_key_signature', 'email_destinataire', 'user_ip' , 'signature_img_selected']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -697,6 +697,14 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
|||
with open(saved_file, "rb") as imageFile:
|
||||
image_signature_manuelle_string = base64.b64encode(imageFile.read()).decode()
|
||||
|
||||
"""
|
||||
22/06/204 - On abandone l'approche qui consiste a envoyer le fichier de signature.
|
||||
on va plutot envoyer directement la signature sous forme d'image.
|
||||
"""
|
||||
image_signature_manuelle_string_v2 = ""
|
||||
if ("signature_img_selected" in diction.keys()):
|
||||
image_signature_manuelle_string_v2 = diction['signature_img_selected']
|
||||
|
||||
"""
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
|
@ -784,8 +792,8 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
|||
new_data['signed_email'] = str(diction['email_destinataire'])
|
||||
new_data['signed_ip_adress'] = str(diction['user_ip'])
|
||||
new_data['statut'] = "1"
|
||||
new_data['signature_nanuelle_img'] = image_signature_manuelle_string
|
||||
|
||||
#new_data['signature_nanuelle_img'] = image_signature_manuelle_string
|
||||
new_data["mysy_manual_signature_img"] = image_signature_manuelle_string_v2
|
||||
|
||||
qry_key = {'valide': '1', 'locked': '0',
|
||||
'_id': ObjectId(str(diction['e_doc_id'])),
|
||||
|
@ -899,7 +907,8 @@ def Create_E_Signature_For_E_Document(file_img=None, Folder=None, diction=None):
|
|||
convention_dictionnary_data["mysy_signature_digitale"] = str(local_signature_digitale)
|
||||
convention_dictionnary_data["mysy_url_securite"] = local_url_securite
|
||||
convention_dictionnary_data["mysy_qrcode_securite"] = "data:image/png;base64," + qr_code_converted_string
|
||||
convention_dictionnary_data["mysy_manual_signature_img"] = "data:image/png;base64," + image_signature_manuelle_string
|
||||
#convention_dictionnary_data["mysy_manual_signature_img"] = "data:image/png;base64," + image_signature_manuelle_string
|
||||
convention_dictionnary_data["mysy_manual_signature_img"] = image_signature_manuelle_string_v2
|
||||
|
||||
body = {
|
||||
"params": convention_dictionnary_data
|
||||
|
@ -1281,13 +1290,13 @@ Signature d'une facture electronique : E-Invoice
|
|||
def Create_E_Signature_For_E_Invoice(file_img=None, Folder=None, diction=None):
|
||||
try:
|
||||
|
||||
print(" GRR diction = ", diction)
|
||||
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'e_doc_id', 'secret_key_signature', 'email_destinataire', 'user_ip']
|
||||
field_list = ['token', 'e_doc_id', 'secret_key_signature', 'email_destinataire', 'user_ip', 'signature_img_selected']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -1328,6 +1337,15 @@ def Create_E_Signature_For_E_Invoice(file_img=None, Folder=None, diction=None):
|
|||
with open(saved_file, "rb") as imageFile:
|
||||
image_signature_manuelle_string = base64.b64encode(imageFile.read()).decode()
|
||||
|
||||
"""
|
||||
22/06/204 - On abandone l'approche qui consiste a envoyer le fichier de signature.
|
||||
on va plutot envoyer directement la signature sous forme d'image.
|
||||
"""
|
||||
image_signature_manuelle_string_v2 = ""
|
||||
if( "signature_img_selected" in diction.keys() ):
|
||||
image_signature_manuelle_string_v2 = diction['signature_img_selected']
|
||||
|
||||
|
||||
"""
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
|
@ -1521,8 +1539,8 @@ def Create_E_Signature_For_E_Invoice(file_img=None, Folder=None, diction=None):
|
|||
convention_dictionnary_data["mysy_signature_digitale"] = str(local_signature_digitale)
|
||||
convention_dictionnary_data["mysy_url_securite"] = local_url_securite
|
||||
convention_dictionnary_data["mysy_qrcode_securite"] = "data:image/png;base64," + qr_code_converted_string
|
||||
convention_dictionnary_data[
|
||||
"mysy_manual_signature_img"] = "data:image/png;base64," + image_signature_manuelle_string
|
||||
#convention_dictionnary_data[ "mysy_manual_signature_img"] = "data:image/png;base64," + image_signature_manuelle_string
|
||||
convention_dictionnary_data["mysy_manual_signature_img"] = image_signature_manuelle_string_v2
|
||||
|
||||
body = {
|
||||
"params": convention_dictionnary_data
|
||||
|
|
|
@ -2414,8 +2414,9 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
print(" #### local_controle_message = ", local_controle_message)
|
||||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore', skipinitialspace=True)
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -2450,6 +2451,8 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
3]) + " : Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire")
|
||||
return False, " Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire "
|
||||
|
||||
|
||||
|
||||
"""
|
||||
# Recuperation des info de la session.
|
||||
session_data = MYSY_GV.dbname['session_formation'].find_one({'formation_session_id':str(session_id)})
|
||||
|
@ -2780,8 +2783,10 @@ def Controle_AddStagiairetoClass_mass(saved_file=None, Folder=None, diction=None
|
|||
# print(" Lecture du fichier : "+saved_file)
|
||||
nb_line = 0
|
||||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore', skipinitialspace=True)
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -2816,6 +2821,7 @@ def Controle_AddStagiairetoClass_mass(saved_file=None, Folder=None, diction=None
|
|||
3]) + " : Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire")
|
||||
return False, " Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire "
|
||||
|
||||
|
||||
"""
|
||||
# Recuperation des info de la session.
|
||||
session_data = MYSY_GV.dbname['session_formation'].find_one({'formation_session_id':str(session_id)})
|
||||
|
@ -3123,8 +3129,10 @@ def AddStagiairetoClass_mass_for_many_session(file=None, Folder=None, diction=No
|
|||
print(" #### local_controle_message = ", local_controle_message)
|
||||
|
||||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore', skipinitialspace=True)
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -3150,6 +3158,7 @@ def AddStagiairetoClass_mass_for_many_session(file=None, Folder=None, diction=No
|
|||
str(inspect.stack()[0][3])+" : entete du fichier csv. '" + val + "' n'est pas acceptée")
|
||||
return False, " Entete du fichier csv.La Colonne '" + val + "' n'est pas acceptée"
|
||||
|
||||
|
||||
# Verification des champs obligatoires dans le fichier
|
||||
field_list_obligatoire_file = ['prenom', 'nom', 'email', 'modefinancement', 'status', 'prix']
|
||||
|
||||
|
@ -3160,6 +3169,7 @@ def AddStagiairetoClass_mass_for_many_session(file=None, Folder=None, diction=No
|
|||
3]) + " : Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire")
|
||||
return False, " Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire "
|
||||
|
||||
|
||||
"""
|
||||
# Recuperation des info de la session.
|
||||
session_data = MYSY_GV.dbname['session_formation'].find_one({'formation_session_id':str(session_id)})
|
||||
|
@ -3374,7 +3384,7 @@ def AddStagiairetoClass_mass_for_many_session(file=None, Folder=None, diction=No
|
|||
if ("facture_client_rattachement_email" in df.keys()):
|
||||
if (str(df['facture_client_rattachement_email'].values[n]) and str(
|
||||
df['facture_client_rattachement_email'].values[n]) != "nan"):
|
||||
client_rattachement_email = str(df['facture_client_rattachement_email'].values[n]).strip()
|
||||
facture_client_rattachement_email = str(df['facture_client_rattachement_email'].values[n]).strip()
|
||||
|
||||
facture_client_rattachement_nom = ""
|
||||
if ("facture_client_rattachement_nom" in df.keys()):
|
||||
|
@ -3517,8 +3527,11 @@ def Controle_AddStagiairetoClass_mass_for_many_session(saved_file=None, Folder=N
|
|||
|
||||
|
||||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore', skipinitialspace=True)
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -3545,6 +3558,7 @@ def Controle_AddStagiairetoClass_mass_for_many_session(saved_file=None, Folder=N
|
|||
str(inspect.stack()[0][3])+" : entete du fichier csv. '" + val + "' n'est pas acceptée")
|
||||
return False, " Entete du fichier csv. La Colonne '" + val + "' n'est pas acceptée"
|
||||
|
||||
|
||||
# Verification des champs obligatoires dans le fichier
|
||||
field_list_obligatoire_file = ['prenom', 'nom', 'email', 'modefinancement', 'status', 'prix']
|
||||
|
||||
|
@ -3555,6 +3569,11 @@ def Controle_AddStagiairetoClass_mass_for_many_session(saved_file=None, Folder=N
|
|||
3]) + " : Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire")
|
||||
return False, " Le champ '" + val + "' n'est pas présent dans le fichier. Il est obligatoire "
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
# Recuperation des info de la session.
|
||||
session_data = MYSY_GV.dbname['session_formation'].find_one({'formation_session_id':str(session_id)})
|
||||
|
@ -3747,7 +3766,7 @@ def Controle_AddStagiairetoClass_mass_for_many_session(saved_file=None, Folder=N
|
|||
if ("facture_client_rattachement_email" in df.keys()):
|
||||
if (str(df['facture_client_rattachement_email'].values[n]) and str(
|
||||
df['facture_client_rattachement_email'].values[n]) != "nan"):
|
||||
client_rattachement_email = str(df['facture_client_rattachement_email'].values[n]).strip()
|
||||
facture_client_rattachement_email = str(df['facture_client_rattachement_email'].values[n]).strip()
|
||||
|
||||
facture_client_rattachement_nom = ""
|
||||
if ("facture_client_rattachement_nom" in df.keys()):
|
||||
|
@ -8782,9 +8801,20 @@ def Sent_Convention_Stagiaire_By_Email(tab_files, Folder, diction):
|
|||
|
||||
sourceHtml = contenu_doc_Template.render(params=body["params"])
|
||||
|
||||
"""
|
||||
new_model_courrier_with_code_tag = str(
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
"""
|
||||
new_model_courrier_with_code_tag = " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" <img style = 'height:60px; width:60px;' src = '{{ params.mysy_qrcode_securite }}' > <br/>" \
|
||||
" <nav style = 'font-size: 10px; font-style: italic;' > Sécurisé par MySy Training Technology </nav>" \
|
||||
" <br/> </div> </div>" + \
|
||||
str(sourceHtml) + " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" Signature Client <br/> <img style = 'height:100px; width:100px' " \
|
||||
" src = '{{ params.mysy_manual_signature_img }}' > <br/> " \
|
||||
" </div> </div>"
|
||||
|
||||
|
||||
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||
ts = datetime.now().timestamp()
|
||||
|
@ -10635,10 +10665,18 @@ def Sent_Convention_Stagiaire_By_Email_By_Partner_client(tab_files_name_full_pat
|
|||
|
||||
sourceHtml = contenu_doc_Template.render(params=body["params"])
|
||||
|
||||
"""
|
||||
new_model_courrier_with_code_tag = str(sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
|
||||
"""
|
||||
new_model_courrier_with_code_tag = " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" <img style = 'height:60px; width:60px;' src = '{{ params.mysy_qrcode_securite }}' > <br/>" \
|
||||
" <nav style = 'font-size: 10px; font-style: italic;' > Sécurisé par MySy Training Technology </nav>" \
|
||||
" <br/> </div> </div>" + \
|
||||
str(sourceHtml)+ " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" Signature Client <br/> <img style = 'height:100px; width:100px' " \
|
||||
" src = '{{ params.mysy_manual_signature_img }}' > <br/> " \
|
||||
" </div> </div>"
|
||||
|
||||
todays_date = str(date.today().strftime("%d/%m/%Y"))
|
||||
ts = datetime.now().timestamp()
|
||||
|
@ -12922,8 +12960,6 @@ def Update_Emargement_QR_Code_From_Inscription_No_Token(file_img=None, Folder=No
|
|||
22/06/204 - On abandone l'approche qui consiste a envoyer le fichier de signature.
|
||||
on va plutot envoyer directement la signature sous forme d'image.
|
||||
"""
|
||||
|
||||
|
||||
image_signature_manuelle_string_v2 = diction['signature_img_selected']
|
||||
|
||||
tab_my_emargement_ids = str(my_emargement_ids).split(",")
|
||||
|
@ -12965,7 +13001,7 @@ def Update_Emargement_QR_Code_From_Inscription_No_Token(file_img=None, Folder=No
|
|||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
|
||||
return True, "L'émargement a été prise en compte"
|
||||
return True, "L'émargement a été pris en compte"
|
||||
|
||||
|
||||
except Exception as e:
|
||||
|
|
9910
Log/log_file.log
9910
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -628,6 +628,7 @@ def GetSessionFormation(diction):
|
|||
}
|
||||
]
|
||||
|
||||
|
||||
#print(" ##### myquery GetSessionFormation = "+str(myquery))
|
||||
RetObject = []
|
||||
nb_val = 0
|
||||
|
@ -699,6 +700,40 @@ def GetSessionFormation(diction):
|
|||
user['site_formation_id'] = site_formation_id
|
||||
user['site_formation_code'] = site_formation_code
|
||||
|
||||
"""
|
||||
Regarder si cette inscriptiona des inscriptions (validées) d'entreprise
|
||||
"""
|
||||
tmp_count = MYSY_GV.dbname['inscription'].count_documents({'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'status': '1',
|
||||
'session_id': str(diction['session_id']),
|
||||
'client_rattachement_id': {'$exists': True,
|
||||
'$ne': ""}})
|
||||
|
||||
user['nb_valide_inscription_entreprise'] = str(tmp_count)
|
||||
|
||||
"""
|
||||
Regarder si cette inscriptiona des inscriptions (validées) d'individuelle
|
||||
"""
|
||||
tmp_count = MYSY_GV.dbname['inscription'].count_documents({'$or': [
|
||||
{'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'status': '1',
|
||||
'session_id': str(diction['session_id']),
|
||||
'client_rattachement_id': {'$exists': False}}
|
||||
,
|
||||
{'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'status': '1',
|
||||
'session_id': str(diction['session_id']),
|
||||
'client_rattachement_id': ""}
|
||||
|
||||
]}
|
||||
|
||||
)
|
||||
|
||||
user['nb_valide_inscription_individuelle'] = str(tmp_count)
|
||||
|
||||
#print(" ### user = ", user)
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
@ -709,6 +744,7 @@ def GetSessionFormation(diction):
|
|||
mycommon.myprint(str(inspect.stack()[0][3]) + " - la query "+str(myquery)+" retourne "+str(nb_val)+" session. ceci n'est pas normal. il ne doit pas y avoir plus 1 session")
|
||||
return False, " Les informations de la session "+str(session_id)+" sont incohérentes. Merci de contacter le support"
|
||||
|
||||
|
||||
return True, RetObject
|
||||
|
||||
|
||||
|
@ -2175,6 +2211,8 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -2633,6 +2671,8 @@ def Controle_Add_Update_SessionFormation_mass(saved_file=None, Folder=None, dict
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -3140,6 +3180,8 @@ def Add_Update_SessionFormation_mass_for_many_class(file=None, Folder=None, dict
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -3644,6 +3686,8 @@ def Controle_Add_Update_SessionFormation_mass_for_many_class(saved_file=None, Fo
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -11534,8 +11578,130 @@ def Invoice_Create_Secure_E_Document(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
"""
|
||||
Recuperation des produits et services
|
||||
"""
|
||||
query = query = [{'$match': {'$and': [filt_order_header_order_id,
|
||||
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
||||
{'$lookup': {
|
||||
'from': 'partner_produit_service',
|
||||
"let": {'order_line_formation': "$order_line_formation",
|
||||
"partner_produit_service_partner_owner_recid": "$partner_owner_recid"
|
||||
},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$order_line_formation",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
{'$eq': ["$partner_owner_recid",
|
||||
'$$partner_produit_service_partner_owner_recid']},
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
'as': 'collection_partner_produit_service'
|
||||
}
|
||||
},
|
||||
]
|
||||
print("#### Get_Given_Partner_Order_Lines_From_order_ref_interne for PRODUCT & SERVICES : query pip= ", query)
|
||||
|
||||
for retval in MYSY_GV.dbname['partner_invoice_line'].aggregate(query):
|
||||
if ('collection_partner_produit_service' in retval.keys() and len(
|
||||
retval['collection_partner_produit_service']) > 0):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
user['_id'] = retval['_id']
|
||||
user['order_line_formation'] = retval['order_line_formation']
|
||||
user['order_line_qty'] = retval['order_line_qty']
|
||||
user['order_line_prix_unitaire'] = retval['order_line_prix_unitaire']
|
||||
user['invoice_header_id'] = retval['invoice_header_id']
|
||||
user['invoice_header_ref_interne'] = retval['invoice_header_ref_interne']
|
||||
user['invoice_date'] = retval['invoice_date']
|
||||
user['valide'] = retval['valide']
|
||||
user['locked'] = retval['locked']
|
||||
|
||||
if ("order_line_montant_reduction" in retval.keys()):
|
||||
user['order_line_montant_reduction'] = retval['order_line_montant_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = "0"
|
||||
|
||||
if ("order_line_montant_toutes_taxes" in retval.keys()):
|
||||
user['order_line_montant_toutes_taxes'] = retval['order_line_montant_toutes_taxes']
|
||||
else:
|
||||
user['order_line_montant_toutes_taxes'] = "0"
|
||||
|
||||
if ("order_line_tax" in retval.keys()):
|
||||
user['order_line_tax'] = retval['order_line_tax']
|
||||
else:
|
||||
user['order_line_tax'] = ""
|
||||
|
||||
if ("order_line_tax_amount" in retval.keys()):
|
||||
user['order_line_tax_amount'] = retval['order_line_tax_amount']
|
||||
else:
|
||||
user['order_line_tax_amount'] = "0"
|
||||
|
||||
if ("order_line_type_reduction" in retval.keys()):
|
||||
user['order_line_type_reduction'] = retval['order_line_type_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = ""
|
||||
|
||||
if ("order_line_type_valeur" in retval.keys()):
|
||||
user['order_line_type_valeur'] = retval['order_line_type_valeur']
|
||||
else:
|
||||
user['order_line_type_valeur'] = "0"
|
||||
|
||||
if ("order_line_montant_hors_taxes" in retval.keys()):
|
||||
user['order_line_montant_hors_taxes'] = retval['order_line_montant_hors_taxes']
|
||||
else:
|
||||
user['order_line_montant_hors_taxes'] = "0"
|
||||
|
||||
user['date_update'] = retval['date_update']
|
||||
user['update_by'] = str(my_partner['_id'])
|
||||
user['partner_owner_recid'] = retval['partner_owner_recid']
|
||||
user['invoice_line_type'] = retval['invoice_line_type']
|
||||
|
||||
if ("order_line_comment" in retval.keys()):
|
||||
user['order_line_comment'] = retval['order_line_comment']
|
||||
else:
|
||||
user['order_line_comment'] = ""
|
||||
|
||||
user['title'] = retval['collection_partner_produit_service'][0]['nom']
|
||||
user['order_line_formation_external_code'] = retval['collection_partner_produit_service'][0]['code']
|
||||
|
||||
user['domaine'] = ""
|
||||
|
||||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
|
||||
if (len(Order_header_lines_data) <= 0):
|
||||
mycommon.myprint(str(inspect.stack()[0][
|
||||
3]) + " - Aucune ligne de détail pour cette facture ")
|
||||
|
|
|
@ -1582,6 +1582,7 @@ def Add_Apprenant_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -1861,6 +1862,7 @@ def Controle_Add_Apprenant_mass(saved_file=None, Folder=None, diction=None):
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
total_rows = len(df)
|
||||
|
||||
|
|
|
@ -3198,6 +3198,8 @@ def add_class_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
@ -3687,6 +3689,8 @@ def Controle_add_class_mass(saved_file=None, Folder=None, diction=None):
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
|
2
main.py
2
main.py
|
@ -8569,7 +8569,7 @@ def Create_E_Signature_For_E_Document():
|
|||
# On recupere le corps (payload) de la requete
|
||||
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Create_E_Signature_For_E_Document payload = ",payload)
|
||||
print(" ### Create_E_Signature_For_E_Document payload = (cherif : trop long a afficher ")
|
||||
|
||||
file_img = None
|
||||
if request.method == 'POST':
|
||||
|
|
|
@ -198,6 +198,10 @@ def Get_Editable_Document_By_Partner_By_Collection(diction):
|
|||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 0
|
||||
|
||||
|
@ -426,7 +430,10 @@ def Get_Editable_Document_By_Partner_By_Collection(diction):
|
|||
val_tmp = val_tmp + 1
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
#print(" #### RetObject = ", RetObject)
|
||||
|
||||
|
||||
|
||||
#print(" #### rrrr RetObject = ", RetObject)
|
||||
|
||||
return True, RetObject
|
||||
|
||||
|
|
|
@ -1633,6 +1633,7 @@ def Add_Partner_Client_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
# Verification que les noms des colonne sont bien corrects"
|
||||
|
|
|
@ -678,11 +678,130 @@ def Get_Given_Partner_Invoice_Lines(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
"""
|
||||
Recuperation des produits et services
|
||||
"""
|
||||
query = [{'$match': {'$and': [filt_invoice_header_id,
|
||||
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
||||
{'$lookup': {
|
||||
'from': 'partner_produit_service',
|
||||
"let": {'order_line_formation': "$order_line_formation",
|
||||
"partner_produit_service_partner_owner_recid": "$partner_owner_recid"
|
||||
},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$order_line_formation",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
{'$eq': ["$partner_owner_recid",
|
||||
'$$partner_produit_service_partner_owner_recid']},
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
],
|
||||
'as': 'collection_partner_produit_service'
|
||||
}
|
||||
},
|
||||
]
|
||||
print("#### Get_Given_Partner_Invoice_Lines for PRODUCT & SERVICES : query pip= ", query)
|
||||
|
||||
for retval in MYSY_GV.dbname['partner_invoice_line'].aggregate(query):
|
||||
if ('collection_partner_produit_service' in retval.keys() and len(retval['collection_partner_produit_service']) > 0):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
user['_id'] = retval['_id']
|
||||
user['order_line_formation'] = retval['order_line_formation']
|
||||
user['order_line_qty'] = retval['order_line_qty']
|
||||
user['order_line_prix_unitaire'] = retval['order_line_prix_unitaire']
|
||||
user['invoice_header_id'] = retval['invoice_header_id']
|
||||
user['invoice_header_ref_interne'] = retval['invoice_header_ref_interne']
|
||||
user['invoice_date'] = retval['invoice_date']
|
||||
user['valide'] = retval['valide']
|
||||
user['locked'] = retval['locked']
|
||||
|
||||
if ("order_line_montant_reduction" in retval.keys()):
|
||||
user['order_line_montant_reduction'] = retval['order_line_montant_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = "0"
|
||||
|
||||
if ("order_line_montant_toutes_taxes" in retval.keys()):
|
||||
user['order_line_montant_toutes_taxes'] = retval['order_line_montant_toutes_taxes']
|
||||
else:
|
||||
user['order_line_montant_toutes_taxes'] = "0"
|
||||
|
||||
if ("order_line_tax" in retval.keys()):
|
||||
user['order_line_tax'] = retval['order_line_tax']
|
||||
else:
|
||||
user['order_line_tax'] = ""
|
||||
|
||||
if ("order_line_tax_amount" in retval.keys()):
|
||||
user['order_line_tax_amount'] = retval['order_line_tax_amount']
|
||||
else:
|
||||
user['order_line_tax_amount'] = "0"
|
||||
|
||||
if ("order_line_type_reduction" in retval.keys()):
|
||||
user['order_line_type_reduction'] = retval['order_line_type_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = ""
|
||||
|
||||
if ("order_line_type_valeur" in retval.keys()):
|
||||
user['order_line_type_valeur'] = retval['order_line_type_valeur']
|
||||
else:
|
||||
user['order_line_type_valeur'] = "0"
|
||||
|
||||
if ("order_line_montant_hors_taxes" in retval.keys()):
|
||||
user['order_line_montant_hors_taxes'] = retval['order_line_montant_hors_taxes']
|
||||
else:
|
||||
user['order_line_montant_hors_taxes'] = "0"
|
||||
|
||||
user['date_update'] = retval['date_update']
|
||||
user['update_by'] = str(my_partner['_id'])
|
||||
user['partner_owner_recid'] = retval['partner_owner_recid']
|
||||
user['invoice_line_type'] = retval['invoice_line_type']
|
||||
|
||||
if ("order_line_comment" in retval.keys()):
|
||||
user['order_line_comment'] = retval['order_line_comment']
|
||||
else:
|
||||
user['order_line_comment'] = ""
|
||||
|
||||
user['title'] = retval['collection_partner_produit_service'][0]['nom']
|
||||
user['order_line_formation_external_code'] = retval['collection_partner_produit_service'][0]['code']
|
||||
|
||||
user['domaine'] = ""
|
||||
|
||||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
print(" ### Get_Given_Partner_Invoice_Lines for PRODUCT & SERVICES : RetObject = ", RetObject)
|
||||
return True, RetObject
|
||||
|
||||
|
||||
|
@ -861,6 +980,126 @@ def Get_Given_Partner_Invoice_Lines_From_Invoice_ref_interne(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
"""
|
||||
Recuperation des produits et services
|
||||
"""
|
||||
query = [{'$match': {'$and': [filt_invoice_header_id,
|
||||
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
||||
{'$lookup': {
|
||||
'from': 'partner_produit_service',
|
||||
"let": {'order_line_formation': "$order_line_formation",
|
||||
"partner_produit_service_partner_owner_recid": "$partner_owner_recid"
|
||||
},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$order_line_formation",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
{'$eq': ["$partner_owner_recid",
|
||||
'$$partner_produit_service_partner_owner_recid']},
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
'as': 'collection_partner_produit_service'
|
||||
}
|
||||
},
|
||||
]
|
||||
print("#### Get_Given_Partner_Invoice_Lines for PRODUCT & SERVICES : query pip= ", query)
|
||||
|
||||
for retval in MYSY_GV.dbname['partner_invoice_line'].aggregate(query):
|
||||
if ('collection_partner_produit_service' in retval.keys() and len(retval['collection_partner_produit_service']) > 0):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
user['_id'] = retval['_id']
|
||||
user['order_line_formation'] = retval['order_line_formation']
|
||||
user['order_line_qty'] = retval['order_line_qty']
|
||||
user['order_line_prix_unitaire'] = retval['order_line_prix_unitaire']
|
||||
user['invoice_header_id'] = retval['invoice_header_id']
|
||||
user['invoice_header_ref_interne'] = retval['invoice_header_ref_interne']
|
||||
user['invoice_date'] = retval['invoice_date']
|
||||
user['valide'] = retval['valide']
|
||||
user['locked'] = retval['locked']
|
||||
|
||||
if ("order_line_montant_reduction" in retval.keys()):
|
||||
user['order_line_montant_reduction'] = retval['order_line_montant_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = "0"
|
||||
|
||||
if ("order_line_montant_toutes_taxes" in retval.keys()):
|
||||
user['order_line_montant_toutes_taxes'] = retval['order_line_montant_toutes_taxes']
|
||||
else:
|
||||
user['order_line_montant_toutes_taxes'] = "0"
|
||||
|
||||
if ("order_line_tax" in retval.keys()):
|
||||
user['order_line_tax'] = retval['order_line_tax']
|
||||
else:
|
||||
user['order_line_tax'] = ""
|
||||
|
||||
if ("order_line_tax_amount" in retval.keys()):
|
||||
user['order_line_tax_amount'] = retval['order_line_tax_amount']
|
||||
else:
|
||||
user['order_line_tax_amount'] = "0"
|
||||
|
||||
if ("order_line_type_reduction" in retval.keys()):
|
||||
user['order_line_type_reduction'] = retval['order_line_type_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = ""
|
||||
|
||||
if ("order_line_type_valeur" in retval.keys()):
|
||||
user['order_line_type_valeur'] = retval['order_line_type_valeur']
|
||||
else:
|
||||
user['order_line_type_valeur'] = "0"
|
||||
|
||||
if ("order_line_montant_hors_taxes" in retval.keys()):
|
||||
user['order_line_montant_hors_taxes'] = retval['order_line_montant_hors_taxes']
|
||||
else:
|
||||
user['order_line_montant_hors_taxes'] = "0"
|
||||
|
||||
user['date_update'] = retval['date_update']
|
||||
user['update_by'] = str(my_partner['_id'])
|
||||
user['partner_owner_recid'] = retval['partner_owner_recid']
|
||||
user['invoice_line_type'] = retval['invoice_line_type']
|
||||
|
||||
if ("order_line_comment" in retval.keys()):
|
||||
user['order_line_comment'] = retval['order_line_comment']
|
||||
else:
|
||||
user['order_line_comment'] = ""
|
||||
|
||||
user['title'] = retval['collection_partner_produit_service'][0]['nom']
|
||||
user['order_line_formation_external_code'] = retval['collection_partner_produit_service'][0]['code']
|
||||
|
||||
user['domaine'] = ""
|
||||
|
||||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
|
@ -1442,6 +1681,121 @@ def Get_Given_Line_Of_Partner_Invoice_Lines(diction):
|
|||
|
||||
|
||||
|
||||
"""
|
||||
Recuperation des produits et services
|
||||
"""
|
||||
query = [{'$match': {'$and': [ filt_invoice_line_id, filt_invoice_line_header_ref_interne,
|
||||
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
||||
{'$lookup': {
|
||||
'from': 'partner_produit_service',
|
||||
"let": {'order_line_formation': "$order_line_formation",
|
||||
"partner_produit_service_partner_owner_recid": "$partner_owner_recid"
|
||||
},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$order_line_formation",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
{'$eq': ["$partner_owner_recid",
|
||||
'$$partner_produit_service_partner_owner_recid']},
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
'as': 'collection_partner_produit_service'
|
||||
}
|
||||
},
|
||||
]
|
||||
print("#### Get_Given_Partner_Invoice_Lines for PRODUCT & SERVICES : query pip= ", query)
|
||||
|
||||
for retval in MYSY_GV.dbname['partner_invoice_line'].aggregate(query):
|
||||
if ('collection_partner_produit_service' in retval.keys() and len(retval['collection_partner_produit_service']) > 0):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
user['_id'] = retval['_id']
|
||||
user['order_line_formation'] = retval['order_line_formation']
|
||||
user['order_line_qty'] = retval['order_line_qty']
|
||||
user['order_line_prix_unitaire'] = retval['order_line_prix_unitaire']
|
||||
user['invoice_header_id'] = retval['invoice_header_id']
|
||||
user['invoice_header_ref_interne'] = retval['invoice_header_ref_interne']
|
||||
user['invoice_date'] = retval['invoice_date']
|
||||
user['valide'] = retval['valide']
|
||||
user['locked'] = retval['locked']
|
||||
|
||||
if ("order_line_montant_reduction" in retval.keys()):
|
||||
user['order_line_montant_reduction'] = retval['order_line_montant_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = "0"
|
||||
|
||||
if ("order_line_montant_toutes_taxes" in retval.keys()):
|
||||
user['order_line_montant_toutes_taxes'] = retval['order_line_montant_toutes_taxes']
|
||||
else:
|
||||
user['order_line_montant_toutes_taxes'] = "0"
|
||||
|
||||
if ("order_line_tax" in retval.keys()):
|
||||
user['order_line_tax'] = retval['order_line_tax']
|
||||
else:
|
||||
user['order_line_tax'] = ""
|
||||
|
||||
if ("order_line_tax_amount" in retval.keys()):
|
||||
user['order_line_tax_amount'] = retval['order_line_tax_amount']
|
||||
else:
|
||||
user['order_line_tax_amount'] = "0"
|
||||
|
||||
if ("order_line_type_reduction" in retval.keys()):
|
||||
user['order_line_type_reduction'] = retval['order_line_type_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = ""
|
||||
|
||||
if ("order_line_type_valeur" in retval.keys()):
|
||||
user['order_line_type_valeur'] = retval['order_line_type_valeur']
|
||||
else:
|
||||
user['order_line_type_valeur'] = "0"
|
||||
|
||||
if ("order_line_montant_hors_taxes" in retval.keys()):
|
||||
user['order_line_montant_hors_taxes'] = retval['order_line_montant_hors_taxes']
|
||||
else:
|
||||
user['order_line_montant_hors_taxes'] = "0"
|
||||
|
||||
user['date_update'] = retval['date_update']
|
||||
user['update_by'] = str(my_partner['_id'])
|
||||
user['partner_owner_recid'] = retval['partner_owner_recid']
|
||||
user['invoice_line_type'] = retval['invoice_line_type']
|
||||
|
||||
if ("order_line_comment" in retval.keys()):
|
||||
user['order_line_comment'] = retval['order_line_comment']
|
||||
else:
|
||||
user['order_line_comment'] = ""
|
||||
|
||||
user['title'] = retval['collection_partner_produit_service'][0]['nom']
|
||||
user['order_line_formation_external_code'] = retval['collection_partner_produit_service'][0]['code']
|
||||
|
||||
user['domaine'] = ""
|
||||
|
||||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
return True, RetObject
|
||||
|
||||
|
@ -1734,6 +2088,127 @@ def GerneratePDF_Partner_Invoice(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
"""
|
||||
Recuperation des produits et services
|
||||
"""
|
||||
query = query = [{'$match': {'$and': [filt_order_header_order_id,
|
||||
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
||||
{'$lookup': {
|
||||
'from': 'partner_produit_service',
|
||||
"let": {'order_line_formation': "$order_line_formation",
|
||||
"partner_produit_service_partner_owner_recid": "$partner_owner_recid"
|
||||
},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$order_line_formation",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
{'$eq': ["$partner_owner_recid",
|
||||
'$$partner_produit_service_partner_owner_recid']},
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
'as': 'collection_partner_produit_service'
|
||||
}
|
||||
},
|
||||
]
|
||||
print("#### Get_Given_Partner_Invoice_Lines for PRODUCT & SERVICES : query pip= ", query)
|
||||
|
||||
for retval in MYSY_GV.dbname['partner_invoice_line'].aggregate(query):
|
||||
if ('collection_partner_produit_service' in retval.keys() and len(retval['collection_partner_produit_service']) > 0):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
user['_id'] = retval['_id']
|
||||
user['order_line_formation'] = retval['order_line_formation']
|
||||
user['order_line_qty'] = retval['order_line_qty']
|
||||
user['order_line_prix_unitaire'] = retval['order_line_prix_unitaire']
|
||||
user['invoice_header_id'] = retval['invoice_header_id']
|
||||
user['invoice_header_ref_interne'] = retval['invoice_header_ref_interne']
|
||||
user['invoice_date'] = retval['invoice_date']
|
||||
user['valide'] = retval['valide']
|
||||
user['locked'] = retval['locked']
|
||||
|
||||
if ("order_line_montant_reduction" in retval.keys()):
|
||||
user['order_line_montant_reduction'] = retval['order_line_montant_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = "0"
|
||||
|
||||
if ("order_line_montant_toutes_taxes" in retval.keys()):
|
||||
user['order_line_montant_toutes_taxes'] = retval['order_line_montant_toutes_taxes']
|
||||
else:
|
||||
user['order_line_montant_toutes_taxes'] = "0"
|
||||
|
||||
if ("order_line_tax" in retval.keys()):
|
||||
user['order_line_tax'] = retval['order_line_tax']
|
||||
else:
|
||||
user['order_line_tax'] = ""
|
||||
|
||||
if ("order_line_tax_amount" in retval.keys()):
|
||||
user['order_line_tax_amount'] = retval['order_line_tax_amount']
|
||||
else:
|
||||
user['order_line_tax_amount'] = "0"
|
||||
|
||||
if ("order_line_type_reduction" in retval.keys()):
|
||||
user['order_line_type_reduction'] = retval['order_line_type_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = ""
|
||||
|
||||
if ("order_line_type_valeur" in retval.keys()):
|
||||
user['order_line_type_valeur'] = retval['order_line_type_valeur']
|
||||
else:
|
||||
user['order_line_type_valeur'] = "0"
|
||||
|
||||
if ("order_line_montant_hors_taxes" in retval.keys()):
|
||||
user['order_line_montant_hors_taxes'] = retval['order_line_montant_hors_taxes']
|
||||
else:
|
||||
user['order_line_montant_hors_taxes'] = "0"
|
||||
|
||||
user['date_update'] = retval['date_update']
|
||||
user['update_by'] = str(my_partner['_id'])
|
||||
user['partner_owner_recid'] = retval['partner_owner_recid']
|
||||
user['invoice_line_type'] = retval['invoice_line_type']
|
||||
|
||||
if ("order_line_comment" in retval.keys()):
|
||||
user['order_line_comment'] = retval['order_line_comment']
|
||||
else:
|
||||
user['order_line_comment'] = ""
|
||||
|
||||
user['title'] = retval['collection_partner_produit_service'][0]['nom']
|
||||
user['order_line_formation_external_code'] = retval['collection_partner_produit_service'][0]['code']
|
||||
|
||||
user['domaine'] = ""
|
||||
|
||||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
if (len(Order_header_lines_data) <= 0):
|
||||
|
@ -2038,8 +2513,128 @@ def Send_Partner_Invoice_By_Email(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
"""
|
||||
Recuperation des produits et services
|
||||
"""
|
||||
query = [{'$match': {'$and': [filt_order_header_order_id,
|
||||
{'partner_owner_recid': str(my_partner['recid'])}]}},
|
||||
|
||||
{'$lookup': {
|
||||
'from': 'partner_produit_service',
|
||||
"let": {'order_line_formation': "$order_line_formation",
|
||||
"partner_produit_service_partner_owner_recid": "$partner_owner_recid"
|
||||
},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$order_line_formation",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
{'$eq': ["$partner_owner_recid",
|
||||
'$$partner_produit_service_partner_owner_recid']},
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
'as': 'collection_partner_produit_service'
|
||||
}
|
||||
},
|
||||
]
|
||||
print("#### Get_Given_Partner_Invoice_Lines for PRODUCT & SERVICES : query pip= ", query)
|
||||
|
||||
for retval in MYSY_GV.dbname['partner_invoice_line'].aggregate(query):
|
||||
if ('collection_partner_produit_service' in retval.keys() and len(retval['collection_partner_produit_service']) > 0):
|
||||
user = {}
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
user['_id'] = retval['_id']
|
||||
user['order_line_formation'] = retval['order_line_formation']
|
||||
user['order_line_qty'] = retval['order_line_qty']
|
||||
user['order_line_prix_unitaire'] = retval['order_line_prix_unitaire']
|
||||
user['invoice_header_id'] = retval['invoice_header_id']
|
||||
user['invoice_header_ref_interne'] = retval['invoice_header_ref_interne']
|
||||
user['invoice_date'] = retval['invoice_date']
|
||||
user['valide'] = retval['valide']
|
||||
user['locked'] = retval['locked']
|
||||
|
||||
if ("order_line_montant_reduction" in retval.keys()):
|
||||
user['order_line_montant_reduction'] = retval['order_line_montant_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = "0"
|
||||
|
||||
if ("order_line_montant_toutes_taxes" in retval.keys()):
|
||||
user['order_line_montant_toutes_taxes'] = retval['order_line_montant_toutes_taxes']
|
||||
else:
|
||||
user['order_line_montant_toutes_taxes'] = "0"
|
||||
|
||||
if ("order_line_tax" in retval.keys()):
|
||||
user['order_line_tax'] = retval['order_line_tax']
|
||||
else:
|
||||
user['order_line_tax'] = ""
|
||||
|
||||
if ("order_line_tax_amount" in retval.keys()):
|
||||
user['order_line_tax_amount'] = retval['order_line_tax_amount']
|
||||
else:
|
||||
user['order_line_tax_amount'] = "0"
|
||||
|
||||
if ("order_line_type_reduction" in retval.keys()):
|
||||
user['order_line_type_reduction'] = retval['order_line_type_reduction']
|
||||
else:
|
||||
user['order_line_montant_reduction'] = ""
|
||||
|
||||
if ("order_line_type_valeur" in retval.keys()):
|
||||
user['order_line_type_valeur'] = retval['order_line_type_valeur']
|
||||
else:
|
||||
user['order_line_type_valeur'] = "0"
|
||||
|
||||
if ("order_line_montant_hors_taxes" in retval.keys()):
|
||||
user['order_line_montant_hors_taxes'] = retval['order_line_montant_hors_taxes']
|
||||
else:
|
||||
user['order_line_montant_hors_taxes'] = "0"
|
||||
|
||||
user['date_update'] = retval['date_update']
|
||||
user['update_by'] = str(my_partner['_id'])
|
||||
user['partner_owner_recid'] = retval['partner_owner_recid']
|
||||
user['invoice_line_type'] = retval['invoice_line_type']
|
||||
|
||||
if ("order_line_comment" in retval.keys()):
|
||||
user['order_line_comment'] = retval['order_line_comment']
|
||||
else:
|
||||
user['order_line_comment'] = ""
|
||||
|
||||
user['title'] = retval['collection_partner_produit_service'][0]['nom']
|
||||
user['order_line_formation_external_code'] = retval['collection_partner_produit_service'][0]['code']
|
||||
|
||||
user['domaine'] = ""
|
||||
|
||||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
if(len(Order_header_lines_data) <= 0 ):
|
||||
mycommon.myprint(str(inspect.stack()[0][
|
||||
|
|
115
partner_order.py
115
partner_order.py
|
@ -3445,6 +3445,12 @@ def Get_Given_Partner_Order_Lines(diction):
|
|||
|
||||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
@ -3568,6 +3574,12 @@ def Get_Given_Partner_Order_Lines(diction):
|
|||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
@ -3765,6 +3777,11 @@ def Get_Given_Partner_Order_Lines_From_order_ref_interne(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
@ -3889,6 +3906,11 @@ def Get_Given_Partner_Order_Lines_From_order_ref_interne(diction):
|
|||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
@ -4133,6 +4155,8 @@ def Get_List_Partner_Order_no_filter(diction):
|
|||
|
||||
user['order_header_vendeur_nom_prenom'] = str(order_header_vendeur_nom_prenom)
|
||||
|
||||
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
return True, RetObject
|
||||
|
@ -4564,6 +4588,12 @@ def Get_Given_Line_Of_Partner_Order_Lines(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
"""
|
||||
|
@ -4688,6 +4718,12 @@ def Get_Given_Line_Of_Partner_Order_Lines(diction):
|
|||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
|
||||
|
@ -5201,6 +5237,12 @@ def GerneratePDF_Partner_Order(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
|
||||
|
@ -5335,6 +5377,12 @@ def GerneratePDF_Partner_Order(diction):
|
|||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
|
||||
|
@ -5674,6 +5722,12 @@ def Gernerate_Stock_PDF_Partner_Order(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
"""
|
||||
|
@ -5807,6 +5861,12 @@ def Gernerate_Stock_PDF_Partner_Order(diction):
|
|||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
if (len(Order_header_lines_data) <= 0):
|
||||
|
@ -6146,6 +6206,12 @@ def Send_Partner_Order_By_Email(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
"""
|
||||
|
@ -6278,6 +6344,11 @@ def Send_Partner_Order_By_Email(diction):
|
|||
user['duration'] = ""
|
||||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
|
@ -7031,6 +7102,8 @@ A la validation, pour chaque ligne du devis,
|
|||
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
|
||||
|
||||
/!\ : on insert que les les formation avec une session
|
||||
|
||||
"""
|
||||
def Insert_Quotation_To_Session(diction):
|
||||
|
@ -7255,10 +7328,21 @@ def Insert_Quotation_To_Session(diction):
|
|||
outputFilename = local_file_retaval_PDF
|
||||
sourceHtml = local_file_retaval_SourceHtml
|
||||
|
||||
new_model_courrier_with_code_tag = str(
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
"""
|
||||
new_model_courrier_with_code_tag = str(sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
"""
|
||||
new_model_courrier_with_code_tag = " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" <img style = 'height:60px; width:60px;' src = '{{ params.mysy_qrcode_securite }}' > <br/>" \
|
||||
" <nav style = 'font-size: 10px; font-style: italic;' > Sécurisé par MySy Training Technology </nav>" \
|
||||
" <br/> </div> </div>" + \
|
||||
str(sourceHtml) + " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" Signature Client <br/> <img style = 'height:100px; width:100px' " \
|
||||
" src = '{{ params.mysy_manual_signature_img }}' > <br/> " \
|
||||
" </div> </div>"
|
||||
|
||||
|
||||
|
||||
if (is_partner_digital_signature == "1"):
|
||||
|
||||
|
@ -7586,10 +7670,21 @@ def Insert_Quotation_To_Session_From_Partner_Owner_Recid(diction):
|
|||
outputFilename = local_file_retaval_PDF
|
||||
sourceHtml = local_file_retaval_SourceHtml
|
||||
|
||||
new_model_courrier_with_code_tag = str(
|
||||
sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
"""
|
||||
new_model_courrier_with_code_tag = str( sourceHtml) + " <p style='width: 300px; text-align: right;'> Signature Client <br/> <img style='height:150px; width:150px' src='{{ params.mysy_manual_signature_img }}'> </p> <br/> " \
|
||||
" <p style='width: 300px; text-align: center;'> <img style='height:150px; width:150px;' src='{{ params.mysy_qrcode_securite }}'> </p> "
|
||||
|
||||
"""
|
||||
new_model_courrier_with_code_tag = " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" <img style = 'height:60px; width:60px;' src = '{{ params.mysy_qrcode_securite }}' > <br/>" \
|
||||
" <nav style = 'font-size: 10px; font-style: italic;' > Sécurisé par MySy Training Technology </nav>" \
|
||||
" <br/> </div> </div>" + \
|
||||
str(sourceHtml) + " <div style='width: 100%'> <div style = 'width: 100%; text-align: center;' >" \
|
||||
" Signature Client <br/> <img style = 'height:100px; width:100px' " \
|
||||
" src = '{{ params.mysy_manual_signature_img }}' > <br/> " \
|
||||
" </div> </div>"
|
||||
|
||||
|
||||
if (is_partner_digital_signature == "1"):
|
||||
|
||||
print("is_valide_qotation_data = ", is_valide_qotation_data)
|
||||
|
@ -7976,6 +8071,12 @@ def Send_Quotation_Remind_Level1(diction):
|
|||
else:
|
||||
user['duration_concat'] = str(retval['myclass_collection'][0]['duration']) + " ?"
|
||||
|
||||
"""
|
||||
Il s'agit d'un formation, vu qu'on a un lien avec la collection "myclass", on force alors le 'order_line_type_article'
|
||||
a 'formation'
|
||||
"""
|
||||
user['order_line_type_article'] = "formation"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
"""
|
||||
|
@ -8109,6 +8210,12 @@ def Send_Quotation_Remind_Level1(diction):
|
|||
user['duration_unit'] = ""
|
||||
user['duration_concat'] = ""
|
||||
|
||||
"""
|
||||
Il s'agit d'un produit, vu qu'on a un lien avec la collection "partner_produit_service", on force alors le 'order_line_type_article'
|
||||
a 'produit'
|
||||
"""
|
||||
user['order_line_type_article'] = "produit"
|
||||
|
||||
Order_header_lines_data.append(user)
|
||||
|
||||
if (len(Order_header_lines_data) <= 0):
|
||||
|
|
|
@ -6089,10 +6089,50 @@ def Check_Partner_Session_Alert(diction):
|
|||
|
||||
"""
|
||||
Pour la liste des étapes à controler, on prent : 'courrier_template_ref_interne'
|
||||
|
||||
s'il n'y pas d'inscription avec client, alors on ne gere pas les conventions d'entrerpise....
|
||||
|
||||
"""
|
||||
list_etape_a_controler = ['CONF_INSCRIPTION', 'CONVENTION_STAGIAIRE_ENTREPRISE',
|
||||
'CONVENTION_STAGIAIRE_INDIVIDUELLE', 'QUESTION_POSITIONNEMENT',
|
||||
'CONVOCATION_STAGIAIRE']
|
||||
list_etape_a_controler = ['CONF_INSCRIPTION', 'QUESTION_POSITIONNEMENT', 'CONVOCATION_STAGIAIRE']
|
||||
|
||||
"""
|
||||
Regarder si cette inscriptiona des inscriptions (validées) d'entreprise
|
||||
"""
|
||||
nb_convention_entreprise = MYSY_GV.dbname['inscription'].count_documents({'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'status': '1',
|
||||
'session_id': str(diction['session_id']),
|
||||
'client_rattachement_id': {'$exists': True,
|
||||
'$ne': ""}})
|
||||
|
||||
|
||||
if( nb_convention_entreprise > 0 ):
|
||||
list_etape_a_controler.append("CONVENTION_STAGIAIRE_ENTREPRISE")
|
||||
|
||||
"""
|
||||
Regarder si cette inscriptiona des inscriptions (validées) d'individuelle
|
||||
"""
|
||||
nb_convention_individuelle = MYSY_GV.dbname['inscription'].count_documents({'$or': [
|
||||
{'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'status': '1',
|
||||
'session_id': str(diction['session_id']),
|
||||
'client_rattachement_id': {'$exists': False}}
|
||||
,
|
||||
{'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide': '1',
|
||||
'status': '1',
|
||||
'session_id': str(diction['session_id']),
|
||||
'client_rattachement_id': ""}
|
||||
|
||||
]}
|
||||
)
|
||||
|
||||
if (nb_convention_individuelle > 0):
|
||||
list_etape_a_controler.append("CONVENTION_STAGIAIRE_INDIVIDUELLE")
|
||||
|
||||
|
||||
|
||||
|
||||
is_warning = 0
|
||||
warning_message = ""
|
||||
|
|
|
@ -2338,6 +2338,7 @@ def Add_Ressource_Humaine_mass(file=None, Folder=None, diction=None):
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
|
@ -2633,6 +2634,7 @@ def Controle_Add_Ressource_Humaine_mass(saved_file=None, Folder=None, diction=No
|
|||
|
||||
df = pd.read_csv(saved_file, encoding='utf8', on_bad_lines='skip', sep=';', encoding_errors='ignore')
|
||||
df = df.fillna('')
|
||||
df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
|
||||
|
||||
# Dictionnaire des champs utilisables
|
||||
'''
|
||||
|
|
Loading…
Reference in New Issue