summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-03-26 10:39:41 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-03-26 10:39:41 +0700
commit2b8b899f68fa4ef04a04fdebbd3baa1f5217d0c6 (patch)
treecf204bc2258c1e35b4a035a855d6f2e166062dd0
parentcc5362aed8b221289416457b72ab11d2aed49b83 (diff)
bug fix total percent margin
-rwxr-xr-xindoteknik_custom/models/sale_order.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index a1e43b03..eda3caa9 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -1424,7 +1424,9 @@ class SaleOrder(models.Model):
delivery_amt = order.delivery_amt
else:
delivery_amt = 0
- order.total_percent_margin = round((order.total_margin / (order.amount_untaxed-delivery_amt-order.fee_third_party)) * 100, 2)
+
+ # order.total_percent_margin = round((order.total_margin / (order.amount_untaxed-delivery_amt-order.fee_third_party)) * 100, 2)
+ order.total_percent_margin = round((order.total_margin / (order.amount_untaxed-order.fee_third_party)) * 100, 2)
# order.total_percent_margin = round((order.total_margin / (order.amount_untaxed)) * 100, 2)
@api.onchange('sales_tax_id')