From ab1ba4b2b482b207a39ae17e43cdac4b1abb72ce Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 25 Feb 2025 11:38:21 +0700 Subject: trying to fix bug margin po --- indoteknik_custom/models/purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 83f86e8e..9c05780b 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -959,7 +959,7 @@ class PurchaseOrder(models.Model): sales_price -= sale_order_line.fee_third_party_line sum_sales_price += sales_price purchase_price = line.price_subtotal - if line.ending_price > 0: + if line.order_id.total_delivery_amount > 0 and line.order_id.total_cost_service > 0: if line.taxes_id.id == 22: ending_price = line.ending_price / 1.11 purchase_price = ending_price -- cgit v1.2.3