summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-03-06 15:17:00 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-03-06 15:17:00 +0700
commit99946425a2a8c70c7f3e0344755504d8c9c3f717 (patch)
tree3aad5a6da61d3816af6c811069982be9b3482112
parentde5a35b272b4c84b5eb7ab8d9d429a9cbae46381 (diff)
Fix price before on promotion program cart
-rw-r--r--indoteknik_custom/models/promotion/promotion_program_line.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/promotion/promotion_program_line.py b/indoteknik_custom/models/promotion/promotion_program_line.py
index cb231889..4bf50ac9 100644
--- a/indoteknik_custom/models/promotion/promotion_program_line.py
+++ b/indoteknik_custom/models/promotion/promotion_program_line.py
@@ -101,8 +101,8 @@ class PromotionProgramLine(models.Model):
weight = sum(x['package_weight'] for x in merged_products)
# Sum of products and free products in 1 package quantity
- products_total = sum(x['price']['price_discount'] * x['qty'] / qty for x in products)
- free_products_total = sum(x['price']['price_discount'] * x['qty'] / qty for x in free_products)
+ products_total = sum(x['price']['price'] * x['qty'] / qty for x in products)
+ free_products_total = sum(x['price']['price'] * x['qty'] / qty for x in free_products)
package_price = products_total + free_products_total
response = {