From fcb16b49de3d86ad766cce9785be98c065d7be17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ch=C3=A9rifBALDE?= Date: Fri, 26 Aug 2022 14:18:13 +0200 Subject: [PATCH] 26/08/22 - 14h30 --- ela_factures_mgt.py | 2 ++ email_mgt.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ela_factures_mgt.py b/ela_factures_mgt.py index 8f42a43..2970f29 100644 --- a/ela_factures_mgt.py +++ b/ela_factures_mgt.py @@ -503,6 +503,7 @@ def createOrder(diction): print(" code = "+str( line_dict['code'] )) print(" prix = " + str(line_dict['prix'])) print(" qty = " + str(line_dict['qty'])) + print(" les produits du pack = " + str(line_dict['pack_products'])) montant_line = mycommon.tryFloat(str(line_dict['prix'])) * mycommon.tryInt(str(line_dict['qty'])) print(" montant_line = " + str(montant_line)) @@ -513,6 +514,7 @@ def createOrder(diction): new_data_item['code'] = line_dict['code'] new_data_item['prix'] = line_dict['prix'] new_data_item['qty'] = line_dict['qty'] + new_data_item['pack_products'] = line_dict['pack_products'] new_data_item['amount'] = str(montant_line) row = "item_"+str(i) new_data[str(row)] = new_data_item diff --git a/email_mgt.py b/email_mgt.py index c6bcf4d..4229d60 100644 --- a/email_mgt.py +++ b/email_mgt.py @@ -415,7 +415,8 @@ def SalesOrderConfirmationEmail(account_mail, diction): qty = diction["item_0"]['qty'] unit_price = diction["item_0"]['prix'] montant = diction["item_0"]['amount'] - detail_packs = " detail_lin1 \n detail_lin2 \n detail_lin3" + detail_packs = diction["item_0"]['pack_products'] + print("diction['item_0']['pack_products'] = "+str(diction["item_0"]['pack_products'])) # produit 2 if ("item_1" in diction.keys()): @@ -424,6 +425,7 @@ def SalesOrderConfirmationEmail(account_mail, diction): qty1 = diction["item_0"]['qty'] unit_price1 = diction["item_1"]['prix'] montant1 = diction["item_1"]['amount'] + detail_packs1 = diction["item_1"]['pack_products'] # produit 3 if ("item_2" in diction.keys()): @@ -432,6 +434,7 @@ def SalesOrderConfirmationEmail(account_mail, diction): qty2 = diction["item_0"]['qty'] unit_price2 = diction["item_2"]['prix'] montant2 = diction["item_2"]['amount'] + detail_packs2 = diction["item_1"]['pack_products'] i = 0