04/10/2024 - 11h45
parent
866336ffe9
commit
f29dcd46fa
|
@ -1,7 +1,7 @@
|
|||
<?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="sdfsd">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="sdfsdsdsd">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/partner_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
|
||||
|
@ -75,13 +75,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00353" summary="dqsdqss">
|
||||
<created>1721132859678</created>
|
||||
<option name="number" value="00353" />
|
||||
<option name="presentableId" value="LOCAL-00353" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1721132859680</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00354" summary="17/07/2024 - 11h30">
|
||||
<created>1721207839106</created>
|
||||
<option name="number" value="00354" />
|
||||
|
@ -418,7 +411,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1727693258457</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="402" />
|
||||
<task id="LOCAL-00402" summary="sdfsdsdsd">
|
||||
<created>1727982203432</created>
|
||||
<option name="number" value="00402" />
|
||||
<option name="presentableId" value="LOCAL-00402" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1727982203433</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="403" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -460,7 +460,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="20/08/2024 - 21h55" />
|
||||
<MESSAGE value="21/08/2024 - 13h55" />
|
||||
<MESSAGE value="ss" />
|
||||
<MESSAGE value="ddd" />
|
||||
|
@ -485,6 +484,7 @@
|
|||
<MESSAGE value="23/09/2024 - 17h" />
|
||||
<MESSAGE value="25/09/2024 - 15h" />
|
||||
<MESSAGE value="sdfsd" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="sdfsd" />
|
||||
<MESSAGE value="sdfsdsdsd" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="sdfsdsdsd" />
|
||||
</component>
|
||||
</project>
|
2198
Log/log_file.log
2198
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -242,7 +242,8 @@ def Invoice_Partner_Order(diction):
|
|||
|
||||
print(" #### A COPIER new_invoice_data_header = ", str(new_invoice_data_header))
|
||||
|
||||
new_invoice_data_header['invoice_header_ref_interne'] = retval_sequence_invoice['prefixe']+str(current_seq_value)
|
||||
invoice_ref_interne = retval_sequence_invoice['prefixe']+str(current_seq_value)
|
||||
new_invoice_data_header['invoice_header_ref_interne'] = invoice_ref_interne
|
||||
new_invoice_data_header['invoice_header_type'] = "facture"
|
||||
new_invoice_data_header['invoice_date'] = invoice_date_time
|
||||
new_invoice_data_header['update_by'] = str(my_partner['_id'])
|
||||
|
@ -347,6 +348,38 @@ def Invoice_Partner_Order(diction):
|
|||
" Impossible de finaliser la facturation des lignes de la ligne la commande ")
|
||||
return False, " Impossible de finaliser la facturation des lignes de la ligne la commande. ", False
|
||||
|
||||
"""
|
||||
04/10/2024 - update pour faire le BPF
|
||||
|
||||
on va créer une table de detail qui reprend le detail des inscription
|
||||
"""
|
||||
partner_invoice_line_data_detail = {}
|
||||
partner_invoice_line_data_detail['order_line_inscription_id'] = ""
|
||||
partner_invoice_line_data_detail['order_line_inscription_type_apprenant'] = str(new_invoice_data_line['order_line_type_apprenant'])
|
||||
partner_invoice_line_data_detail['order_line_inscription_modefinancement'] = ""
|
||||
partner_invoice_line_data_detail['order_line_formation'] = str(new_invoice_data_line['order_line_formation'])
|
||||
partner_invoice_line_data_detail['order_line_prix_unitaire'] = str(new_invoice_data_line['order_line_prix_unitaire'])
|
||||
partner_invoice_line_data_detail['order_line_montant_hors_taxes'] = str(new_invoice_data_line['order_line_montant_hors_taxes'])
|
||||
partner_invoice_line_data_detail['order_line_invoiced_amount'] = str(new_invoice_data_line['order_line_montant_hors_taxes'])
|
||||
partner_invoice_line_data_detail['order_line_comment'] = ""
|
||||
partner_invoice_line_data_detail['invoice_header_id'] = str(inserted_invoice_id)
|
||||
partner_invoice_line_data_detail['invoice_line_type'] = "facture"
|
||||
partner_invoice_line_data_detail['invoice_header_ref_interne'] = str(invoice_ref_interne)
|
||||
|
||||
order_line_is_include_bpf = ""
|
||||
if ("order_header_inclus_bpf" in order_to_invoice_data.keys()):
|
||||
order_line_is_include_bpf = order_to_invoice_data['order_header_inclus_bpf']
|
||||
partner_invoice_line_data_detail['order_line_is_include_bpf'] = order_line_is_include_bpf
|
||||
|
||||
partner_invoice_line_data_detail['update_by'] = str(my_partner['_id'])
|
||||
partner_invoice_line_data_detail['valide'] = "1"
|
||||
partner_invoice_line_data_detail['locked'] = "0"
|
||||
partner_invoice_line_data_detail['partner_owner_recid'] = str(my_partner['recid'])
|
||||
|
||||
print(" #### partner_invoice_line_data = ", partner_invoice_line_data_detail)
|
||||
inserted_detail_invoice_line_id = MYSY_GV.dbname['partner_invoice_line_detail'].insert_one(
|
||||
partner_invoice_line_data_detail).inserted_id
|
||||
|
||||
|
||||
# 3 - on met à jour les lignes de la commande, pr la mettre à facturé
|
||||
qry = {'order_header_id': str(diction['order_id']), 'order_header_ref_interne': str(diction['order_ref_interne']),
|
||||
|
|
|
@ -67,7 +67,8 @@ def Add_Partner_Order(diction):
|
|||
'order_header_type_reduction_valeur', 'order_header_montant_reduction', 'order_lines', 'order_header_type',
|
||||
'order_header_location_type', 'order_header_origin', 'order_header_tax', 'order_header_tax_amount',
|
||||
'total_header_hors_taxe_after_header_reduction', 'total_header_hors_taxe_before_header_reduction', 'total_header_toutes_taxes',
|
||||
'total_lines_hors_taxe_after_lines_reduction', 'total_lines_hors_taxe_before_lines_reduction', 'total_lines_montant_reduction']
|
||||
'total_lines_hors_taxe_after_lines_reduction', 'total_lines_hors_taxe_before_lines_reduction', 'total_lines_montant_reduction',
|
||||
'order_header_inclus_bpf']
|
||||
|
||||
"""
|
||||
/!\ A noter que "order_lines" est tableau [] qui peut contenir les keys suivantes : 'order_line_formation', 'order_line_qty', 'order_line_prix_unitaire', 'order_line_tax', 'order_line_type_reduction', 'order_line_type_valeur', 'order_line_montant_reduction'
|
||||
|
@ -167,6 +168,19 @@ def Add_Partner_Order(diction):
|
|||
return False, " - Le champ 'Condition de paiement' fait plus de 255 caractères ", False
|
||||
data['order_header_condition_paiement_id'] = order_header_condition_paiement_id
|
||||
|
||||
order_header_inclus_bpf = ""
|
||||
if ("order_header_inclus_bpf" in diction.keys()):
|
||||
if diction['order_header_inclus_bpf']:
|
||||
order_header_inclus_bpf = str(diction['order_header_inclus_bpf']).strip()
|
||||
if( order_header_inclus_bpf not in ['0', '1', '']):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Le champ 'inclus BPF' n'est pas valide ")
|
||||
|
||||
return False, " -Le champ 'inclus BPF' n'est pas valide ", False
|
||||
data['order_header_inclus_bpf'] = order_header_inclus_bpf
|
||||
|
||||
|
||||
order_header_ref_interne = ""
|
||||
if ("order_header_ref_interne" in diction.keys()):
|
||||
if diction['order_header_ref_interne']:
|
||||
|
@ -584,7 +598,7 @@ def Add_Partner_Quotation(diction):
|
|||
'order_header_type', 'order_header_location_type', 'order_header_tax', 'order_header_origin',
|
||||
'order_header_tax_amount', 'total_header_hors_taxe_after_header_reduction',
|
||||
'total_header_hors_taxe_before_header_reduction', 'total_header_toutes_taxes', 'total_lines_hors_taxe_after_lines_reduction',
|
||||
'total_lines_hors_taxe_before_lines_reduction', 'total_lines_montant_reduction']
|
||||
'total_lines_hors_taxe_before_lines_reduction', 'total_lines_montant_reduction', 'order_header_inclus_bpf']
|
||||
|
||||
"""
|
||||
/!\ A noter que "order_lines" est tableau [] qui peut contenir les keys suivantes : 'order_line_formation', 'order_line_qty', 'order_line_prix_unitaire', 'order_line_tax', 'order_line_type_reduction', 'order_line_type_valeur', 'order_line_montant_reduction'
|
||||
|
@ -670,6 +684,18 @@ def Add_Partner_Quotation(diction):
|
|||
else:
|
||||
data['order_header_status'] = "0"
|
||||
|
||||
order_header_inclus_bpf = ""
|
||||
if ("order_header_inclus_bpf" in diction.keys()):
|
||||
if diction['order_header_inclus_bpf']:
|
||||
order_header_inclus_bpf = str(diction['order_header_inclus_bpf']).strip()
|
||||
if (order_header_inclus_bpf not in ['0', '1', '']):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Le champ 'inclus BPF' n'est pas valide ")
|
||||
return False, " -Le champ 'inclus BPF' n'est pas valide ", False
|
||||
|
||||
data['order_header_inclus_bpf'] = order_header_inclus_bpf
|
||||
|
||||
|
||||
order_header_location_type = ""
|
||||
if ("order_header_location_type" in diction.keys()):
|
||||
|
@ -1098,7 +1124,8 @@ def Update_Partner_Order_Header(diction):
|
|||
'order_header_ref_interne', 'order_header_total_ht', 'order_header_total_tax',
|
||||
'order_header_total_ttc', 'order_header_status', 'order_header_type_reduction',
|
||||
'order_header_type_reduction_valeur', 'order_header_montant_reduction',
|
||||
'order_header_id', 'order_header_type', 'order_header_location_type', 'order_header_origin']
|
||||
'order_header_id', 'order_header_type', 'order_header_location_type', 'order_header_origin',
|
||||
'order_header_inclus_bpf']
|
||||
|
||||
|
||||
|
||||
|
@ -1204,6 +1231,19 @@ def Update_Partner_Order_Header(diction):
|
|||
return False, " - Le champ 'Statut' est invalide. Les valeurs acceptées "+str(MYSY_GV.PARTNER_ORDER_STATUS)
|
||||
data['order_header_status'] = diction['order_header_status']
|
||||
|
||||
|
||||
order_header_inclus_bpf = ""
|
||||
if ("order_header_inclus_bpf" in diction.keys()):
|
||||
if diction['order_header_inclus_bpf']:
|
||||
order_header_inclus_bpf = str(diction['order_header_inclus_bpf']).strip()
|
||||
if (order_header_inclus_bpf not in ['0', '1', '']):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Le champ 'inclus BPF' n'est pas valide ")
|
||||
|
||||
return False, " -Le champ 'inclus BPF' n'est pas valide ", False
|
||||
data['order_header_inclus_bpf'] = order_header_inclus_bpf
|
||||
|
||||
order_header_location_type = ""
|
||||
if ("order_header_location_type" in diction.keys()):
|
||||
order_header_location_type = diction['order_header_location_type']
|
||||
|
@ -1563,7 +1603,8 @@ def Update_Partner_Quotation_Header(diction):
|
|||
'order_header_ref_interne', 'order_header_total_ht', 'order_header_total_tax',
|
||||
'order_header_total_ttc', 'order_header_status', 'order_header_type_reduction',
|
||||
'order_header_type_reduction_valeur', 'order_header_montant_reduction',
|
||||
'order_header_id', 'order_header_type', 'order_header_location_type', 'order_header_origin']
|
||||
'order_header_id', 'order_header_type', 'order_header_location_type',
|
||||
'order_header_origin', 'order_header_inclus_bpf']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -1679,6 +1720,17 @@ def Update_Partner_Quotation_Header(diction):
|
|||
MYSY_GV.PARTNER_QUOTATION_STATUS)
|
||||
data['order_header_status'] = diction['order_header_status']
|
||||
|
||||
order_header_inclus_bpf = ""
|
||||
if ("order_header_inclus_bpf" in diction.keys()):
|
||||
if diction['order_header_inclus_bpf']:
|
||||
order_header_inclus_bpf = str(diction['order_header_inclus_bpf']).strip()
|
||||
if (order_header_inclus_bpf not in ['0', '1', '']):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Le champ 'inclus BPF' n'est pas valide ")
|
||||
|
||||
return False, " -Le champ 'inclus BPF' n'est pas valide ", False
|
||||
data['order_header_inclus_bpf'] = order_header_inclus_bpf
|
||||
|
||||
order_header_location_type = ""
|
||||
if ("order_header_location_type" in diction.keys()):
|
||||
|
@ -3219,6 +3271,9 @@ def Get_Given_Partner_Order(diction):
|
|||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
if( "order_header_inclus_bpf" not in retval.keys() ):
|
||||
user['order_header_inclus_bpf'] = ""
|
||||
|
||||
# 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 retval.keys() and retval['order_header_condition_paiement_id'] ):
|
||||
|
@ -4050,6 +4105,9 @@ def Get_Given_Partner_Order_From_Internal_ref(diction):
|
|||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
|
||||
if ("order_header_inclus_bpf" not in retval.keys()):
|
||||
user['order_header_inclus_bpf'] = ""
|
||||
|
||||
# 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 retval.keys() and retval['order_header_condition_paiement_id']):
|
||||
|
@ -5668,7 +5726,7 @@ def Gernerate_Stock_PDF_Partner_Order(diction):
|
|||
str(inspect.stack()[0][3]) + " - La commande n'est pas valide ")
|
||||
return False, " La commande n'est pas valide", False
|
||||
|
||||
Order_header_data = MYSY_GV.dbname['partner_order_header'].find_one({'_id': ObjectId(str(diction['order_id'])),
|
||||
Order_header_data = MYSY_GV.dbname['partner_order_header'].findMYSY_GV.dbname['partner_order_header'].find_one({'_id': ObjectId(str(diction['order_id'])),
|
||||
'valide': '1', 'locked': '0',
|
||||
'partner_owner_recid': str(
|
||||
my_partner['recid'])})
|
||||
|
|
Loading…
Reference in New Issue