From 32c2899ccd24071adcee829b569b9d29bb3a4fe9 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Thu, 5 Jun 2025 11:59:27 +0700 Subject: fix round --- indoteknik_custom/models/sale_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py index da66465e..291940ed 100644 --- a/indoteknik_custom/models/sale_order_line.py +++ b/indoteknik_custom/models/sale_order_line.py @@ -155,7 +155,7 @@ class SaleOrderLine(models.Model): margin_before = sales_price - purchase_price if sales_price > 0: - line.item_percent_margin_before = round((margin_before / sales_price), 4) * 100 + line.item_percent_margin_before = round((margin_before / sales_price), 2) * 100 else: line.item_percent_margin_before = 0 -- cgit v1.2.3