diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-02-25 11:38:21 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-02-25 11:38:21 +0700 |
| commit | ab1ba4b2b482b207a39ae17e43cdac4b1abb72ce (patch) | |
| tree | 8021d228d3ea2840d652a44a724124601b1df52e | |
| parent | c6b6142dc2ddf03958616ef11b085f80e1e1d9c6 (diff) | |
trying to fix bug margin po
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
