summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-09-29 11:37:43 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-09-29 11:37:43 +0700
commitc76003a8551021113c05ac35b9bc86fb598a0a87 (patch)
treeb14cd5f94c36afc2b1df8a5f33d6bffe3aa5b834 /indoteknik_custom/models/purchase_order.py
parentc8295772706a8e27d4633706b357ade5c4a8bba8 (diff)
Update purchase_order.py and sale_order.py
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 6b038e69..d51115f8 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -179,7 +179,7 @@ class PurchaseOrder(models.Model):
real_item_margin = sales_price - purchase_price
sum_margin += real_item_margin
- if sum_so_margin > 0 and sum_sales_price > 0 and sum_margin > 0:
+ if sum_so_margin != 0 and sum_sales_price != 0 and sum_margin != 0:
self.total_so_margin = sum_so_margin
self.total_so_percent_margin = round((sum_so_margin / sum_sales_price), 2) * 100
self.total_margin = sum_margin