6/06/2024 - 17h30
parent
7e75677e2a
commit
becc9ab015
|
@ -1,10 +1,9 @@
|
|||
<?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="12/06/2024 - 21h30">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="15/06/2024 - 21h30">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Dashbord_queries/factures_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/factures_tbd_qries.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.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$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
|
@ -77,13 +76,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00283" summary="vvvv">
|
||||
<created>1714823572225</created>
|
||||
<option name="number" value="00283" />
|
||||
<option name="presentableId" value="LOCAL-00283" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1714823572226</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00284" summary="04/05/2024 - 20h30">
|
||||
<created>1714847858090</created>
|
||||
<option name="number" value="00284" />
|
||||
|
@ -420,7 +412,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1718220447608</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="332" />
|
||||
<task id="LOCAL-00332" summary="15/06/2024 - 21h30">
|
||||
<created>1718490413169</created>
|
||||
<option name="number" value="00332" />
|
||||
<option name="presentableId" value="LOCAL-00332" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1718490413170</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="333" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -462,7 +461,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="17/05/2024 - 21h30" />
|
||||
<MESSAGE value="sdf" />
|
||||
<MESSAGE value="18/05/2024 - 22h30" />
|
||||
<MESSAGE value="19/05/2024 - 22h15" />
|
||||
|
@ -487,6 +485,7 @@
|
|||
<MESSAGE value="qqsd" />
|
||||
<MESSAGE value="11/06/2024 - 23h30" />
|
||||
<MESSAGE value="12/06/2024 - 21h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="12/06/2024 - 21h30" />
|
||||
<MESSAGE value="15/06/2024 - 21h30" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="15/06/2024 - 21h30" />
|
||||
</component>
|
||||
</project>
|
|
@ -12564,3 +12564,301 @@ def Update_Emargement_QR_Code_From_Inscription_No_Token(file_img=None, Folder=No
|
|||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible d'émarger "
|
||||
|
||||
"""
|
||||
Cette fonction permet d'ajouter et mettre à jour un split de facture sur une inscription
|
||||
|
||||
La fonction prends en entrée, l'inscription_id, tab_split :[{'partner_client':'cccc', 'invoice_part':'10'},
|
||||
{'partner_client':'yyyyy', 'invoice_part':'800'}]}
|
||||
"""
|
||||
def Add_Update_Inscription_Split_Invoice(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'inscription_id', 'split_type', 'tab_split']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'inscription_id', 'split_type', 'tab_split']
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
# Verifier la validité de l'inscription
|
||||
is_inscription_valide_count = MYSY_GV.dbname['inscription'].count_documents({'_id':ObjectId(str(diction['inscription_id'])),
|
||||
'valide':'1',
|
||||
'partner_owner_recid':str(my_partner['recid'])
|
||||
})
|
||||
if( is_inscription_valide_count != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'inscription est invalide ")
|
||||
return False, " L'identifiant de l'inscription est invalide "
|
||||
|
||||
# Verifier que le 'split_type' est soit percent, soit fixe
|
||||
split_type = str(diction["split_type"]).lower()
|
||||
|
||||
if( split_type not in ['fixe', 'percent']):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Le type de partage doit être en pourcentage ou en montant ")
|
||||
return False, " Le type de partage doit être en pourcentage ou en montant "
|
||||
|
||||
# Verifier que le contenu 'tab_split' est valide et du type : [{'partner_client':'cccc', 'invoice_part':'10'},
|
||||
# {'partner_client':'yyyyy', 'invoice_part':'800'}]
|
||||
tab_split = diction['tab_split']
|
||||
tab_split_JSON = ast.literal_eval(tab_split)
|
||||
|
||||
print(" ### tab_split_JSON = ", tab_split_JSON)
|
||||
|
||||
total_invoice_part = 0
|
||||
|
||||
for val in tab_split_JSON:
|
||||
is_val_ok = "0"
|
||||
if( "partner_client" in val.keys() and val['partner_client'] and "invoice_part" in val.keys() and val["invoice_part"]):
|
||||
local_client = str(val['partner_client'])
|
||||
local_partage = str(val["invoice_part"])
|
||||
|
||||
# Verifier que le client dans le partage est valide
|
||||
is_partage_client_valide = MYSY_GV.dbname['partner_client'].count_documents({'_id':ObjectId(str(local_client)),
|
||||
'valide':'1',
|
||||
'locked':'0',
|
||||
'partner_recid':str(my_partner['recid'])})
|
||||
|
||||
|
||||
if( is_partage_client_valide != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant du client "+str(local_client)+" est invalide ")
|
||||
return False, " L'identifiant du client "+str(local_client)+" est invalide "
|
||||
|
||||
# Verifier que la valeur de partage est bien un floattant
|
||||
is_partage_float_status, is_partage_float_retval = mycommon.IsFloat(local_partage)
|
||||
if( is_partage_float_status is False ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " La valeur de partage " + str(
|
||||
local_partage) + " est invalide ")
|
||||
return False, " La valeur de partage " + str(local_partage) + " est invalide "
|
||||
|
||||
|
||||
total_invoice_part = total_invoice_part + is_partage_float_retval
|
||||
is_val_ok = "1"
|
||||
|
||||
else:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Les paramètres de partage de la facture sont invalides ")
|
||||
return False, " Les paramètres de partage de la facture sont invalides "
|
||||
|
||||
|
||||
|
||||
if( split_type == "percent" and total_invoice_part > 100 ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Pour une répartition par pourcentage, le total ne doit pas depasser 100% ")
|
||||
return False, " Pour une répartition par pourcentage, le total ne doit pas dépasser 100% "
|
||||
|
||||
|
||||
node_invoice_split = {}
|
||||
node_invoice_split['split_type'] = split_type
|
||||
node_invoice_split['tab_split'] = tab_split_JSON
|
||||
|
||||
data_update = {}
|
||||
data_update['update_by'] = str(my_partner['_id'])
|
||||
data_update['date_update'] = str(datetime.now())
|
||||
data_update['invoice_split'] = node_invoice_split
|
||||
|
||||
|
||||
|
||||
inserted_id = ""
|
||||
result = MYSY_GV.dbname['inscription'].find_one_and_update(
|
||||
{'_id': ObjectId(str(diction['inscription_id'])),
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(my_partner['recid'])
|
||||
},
|
||||
{"$set": data_update},
|
||||
upsert=False,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
if ("_id" not in result.keys()):
|
||||
mycommon.myprint(" Impossible de mettre à jour le partage de facture (2) ")
|
||||
return False, " Impossible de mettre à jour le partage de facture (2) "
|
||||
|
||||
return True, " Le partage de facture a été correctement mis à jour "
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de mettre à jour le Le partage de facture "
|
||||
|
||||
"""
|
||||
Cette fonction permet de recuperer uniquement
|
||||
le partage de facture d'un inscription
|
||||
"""
|
||||
|
||||
def Get_Inscription_Split_Invoice(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'inscription_id',]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'inscription_id', ]
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
# Verifier la validité de l'inscription
|
||||
is_inscription_valide_count = MYSY_GV.dbname['inscription'].count_documents({'_id':ObjectId(str(diction['inscription_id'])),
|
||||
'valide':'1',
|
||||
'partner_owner_recid':str(my_partner['recid'])
|
||||
})
|
||||
if( is_inscription_valide_count != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'inscription est invalide ")
|
||||
return False, " L'identifiant de l'inscription est invalide "
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 0
|
||||
for New_retVal in MYSY_GV.dbname['inscription'].find({'_id':ObjectId(str(diction['inscription_id'])),
|
||||
'valide':'1',
|
||||
'partner_owner_recid':str(my_partner['recid'])
|
||||
}, {'_id':1, 'email':1, 'invoice_split':1}):
|
||||
user = New_retVal
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
return True, RetObject
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer les données de partage de facture "
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction supprime un partage de facture sur une inscription
|
||||
"""
|
||||
|
||||
def Delete_Inscription_Split_Invoice(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'inscription_id', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'inscription_id', ]
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
# Verifier la validité de l'inscription
|
||||
is_inscription_valide_count = MYSY_GV.dbname['inscription'].count_documents(
|
||||
{'_id': ObjectId(str(diction['inscription_id'])),
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(my_partner['recid'])
|
||||
})
|
||||
if (is_inscription_valide_count != 1):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " L'identifiant de l'inscription est invalide ")
|
||||
return False, " L'identifiant de l'inscription est invalide "
|
||||
|
||||
result = MYSY_GV.dbname['inscription'].find_one_and_update(
|
||||
{'_id': ObjectId(str(diction['inscription_id'])),
|
||||
'valide': '1',
|
||||
'partner_owner_recid': str(my_partner['recid'])
|
||||
},
|
||||
{"$unset": {"invoice_split":""}},
|
||||
upsert=False,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
if ("_id" not in result.keys()):
|
||||
mycommon.myprint(" Impossible supprimer le partage de facture (2) ")
|
||||
return False, " Impossible supprimer le partage de facture (2) "
|
||||
|
||||
return True, " Le partage de facture a été correctement supprimé "
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible supprimer le partage de facture "
|
||||
|
||||
|
|
5328
Log/log_file.log
5328
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -8873,7 +8873,7 @@ Pour etre valide, ce champs est de type :
|
|||
'invoice_split':{split_type : fixe/percent, tab_split : [{partner_client:cccc, invoice_part:40}, {partner_client:eeeeee, invoice_part:60} ....] }},
|
||||
|
||||
"""
|
||||
def TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id( tab_files, diction):
|
||||
def Invoice_Inscrption_With_Split_Session_By_Inscription_Id( tab_files, diction):
|
||||
try:
|
||||
|
||||
field_list_obligatoire = ['token', 'session_id', 'tab_inscription_ids']
|
||||
|
@ -9016,6 +9016,7 @@ def TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id( tab_files
|
|||
Creation du diction pour la facture SANS SPLIT de facture
|
||||
"""
|
||||
local_tmp_tab = []
|
||||
list_non_splited_invoice = []
|
||||
no_split_tab_inscription_ids = ""
|
||||
for tmp in tab_inscrit_for_NOT_splited_invoice:
|
||||
if( "inscription_id" in tmp.keys() ):
|
||||
|
@ -9039,6 +9040,7 @@ def TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id( tab_files
|
|||
print(" ### status = ", status)
|
||||
print(" ### retval = ", retval)
|
||||
print(" ### invoice_ref = ", invoice_ref)
|
||||
list_non_splited_invoice.append(invoice_ref)
|
||||
|
||||
print(" ### La liste des tab_inscrit_for_splited_invoice ", tab_inscrit_for_splited_invoice)
|
||||
|
||||
|
@ -9060,9 +9062,12 @@ def TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id( tab_files
|
|||
print(" ### invoice_ref = ", invoice_ref)
|
||||
list_splited_invoice.append(invoice_ref)
|
||||
|
||||
print(" Liste des factures SANS split = ", str(list_non_splited_invoice))
|
||||
print(" Liste des factures avec split = ", str(list_splited_invoice))
|
||||
|
||||
return True, "L'email a été correctement envoyé ", ""
|
||||
global_list_facture = str(list_non_splited_invoice)+", "+str(list_splited_invoice)
|
||||
|
||||
return True, "L'email a été correctement envoyé ", str(list_splited_invoice)
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
|
@ -9506,7 +9511,7 @@ def Prepare_and_Send_Facture_From_Session_By_Inscription_Id(tab_files, Folder, d
|
|||
diction_invoice['session_id'] = diction['session_id']
|
||||
diction_invoice['tab_inscription_ids'] = tab_my_inscription_ids_Object
|
||||
print(" ##### liste_client_client_rattachement_id : diction_invoice 0202 icici = ", diction_invoice)
|
||||
local_create_invoice_status, local_create_invoice_retval, local_invoice_ref_interne = Invoice_Partner_From_Session_By_Inscription_Id_On_client_rattachement_id(
|
||||
local_create_invoice_status, local_create_invoice_retval, local_invoice_ref_interne = Invoice_Partner_From_Session_By_Inscription_Id(
|
||||
diction_invoice)
|
||||
if (local_create_invoice_status is False):
|
||||
return local_create_invoice_status, local_create_invoice_retval, False
|
||||
|
|
48
main.py
48
main.py
|
@ -8288,12 +8288,12 @@ def Prepare_and_Send_Facture_From_Session_By_Inscription_Id():
|
|||
"""
|
||||
API DE TEST FACTURATION 15/06/2024
|
||||
"""
|
||||
@app.route('/myclass/api/TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id/', methods=['POST','GET'])
|
||||
@app.route('/myclass/api/Invoice_Inscrption_With_Split_Session_By_Inscription_Id/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id():
|
||||
def Invoice_Inscrption_With_Split_Session_By_Inscription_Id():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id : payload = ",str(payload))
|
||||
print(" ### Invoice_Inscrption_With_Split_Session_By_Inscription_Id : payload = ",str(payload))
|
||||
|
||||
file = []
|
||||
if request.method == 'POST':
|
||||
|
@ -8302,7 +8302,7 @@ def TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id():
|
|||
for tmp in request.files.getlist("File"):
|
||||
tab_files.append(tmp)
|
||||
|
||||
status, retval, invoice_ref = SF.TEST_invoice_split_Invoice_Partner_From_Session_By_Inscription_Id(tab_files, payload)
|
||||
status, retval, invoice_ref = SF.Invoice_Inscrption_With_Split_Session_By_Inscription_Id(tab_files, payload)
|
||||
return jsonify(status=status, message=retval, invoice_ref=invoice_ref)
|
||||
|
||||
|
||||
|
@ -10070,6 +10070,46 @@ def Update_Emargement_QR_Code_From_Inscription_No_Token():
|
|||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
"""
|
||||
API qui permet de faire un partage de facture sur une inscription
|
||||
"""
|
||||
@app.route('/myclass/api/Add_Update_Inscription_Split_Invoice/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Add_Update_Inscription_Split_Invoice():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Add_Update_Inscription_Split_Invoice payload = ",payload)
|
||||
status, retval = inscription.Add_Update_Inscription_Split_Invoice(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
"""
|
||||
API qui permet de recuperer le partage de facturation sur une inscription
|
||||
"""
|
||||
@app.route('/myclass/api/Get_Inscription_Split_Invoice/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_Inscription_Split_Invoice():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_Inscription_Split_Invoice payload = ",payload)
|
||||
status, retval = inscription.Get_Inscription_Split_Invoice(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
"""
|
||||
API pour supprimer un partage de facture
|
||||
"""
|
||||
@app.route('/myclass/api/Delete_Inscription_Split_Invoice/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Delete_Inscription_Split_Invoice():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Delete_Inscription_Split_Invoice payload = ",payload)
|
||||
status, retval = inscription.Delete_Inscription_Split_Invoice(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(" debut api")
|
||||
|
|
Loading…
Reference in New Issue