From 49c16dcc5209642b7d5aa44eeefb859224e70964 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 3 Oct 2023 12:03:55 +0700 Subject: Update default price discount to price on calc web price --- indoteknik_api/models/product_product.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index b49c419c..559ad35c 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -79,10 +79,11 @@ class ProductProduct(models.Model): price_discount = flashsale_price discount_percentage = flashsale_discount + price = self._get_website_price_exclude_tax() return { - 'price': self._get_website_price_exclude_tax(), + 'price': price, 'discount_percentage': discount_percentage, - 'price_discount': price_discount + 'price_discount': price_discount if price_discount > 0 else price } def api_manufacture(self, product_template): -- cgit v1.2.3