From e0d9fdcfd618332d6324c244859e9cbbf3a6a225 Mon Sep 17 00:00:00 2001 From: IT Fixcomart Date: Mon, 24 Oct 2022 11:45:36 +0700 Subject: Product similar result without its id Product result discount percentage limit float length --- indoteknik_api/models/product_pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_api/models') diff --git a/indoteknik_api/models/product_pricelist.py b/indoteknik_api/models/product_pricelist.py index 2cd1eb9f..6a011934 100644 --- a/indoteknik_api/models/product_pricelist.py +++ b/indoteknik_api/models/product_pricelist.py @@ -55,7 +55,7 @@ class ProductPricelist(models.Model): return { 'price': price, 'price_discount': price_discount, - 'discount_percentage': discount_percentage + 'discount_percentage': float("%.2f" % discount_percentage) } def get_lowest_product_variant_price(self, product_template: dict, pricelist_id: int): -- cgit v1.2.3