26/08/22 - 14h30

master
ChérifBALDE 2022-08-26 14:18:13 +02:00 committed by cherif
parent 192c7db3d4
commit fcb16b49de
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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