summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-09-13 16:21:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-09-13 16:21:50 +0700
commit649a8f0d51b8fa7dc90dfbd0967e94dd586cd0aa (patch)
treebe2b91aeb8baa61235b8b43f7e72a272817c3900
parentf44dc785ffcce7738c284fd40d79dbece7b2e5cb (diff)
bug fix sales order with amount equal zero
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 9a6dbd9e..6348328e 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -131,7 +131,7 @@ class SaleOrder(models.Model):
for order in self:
order.margin_after_delivery_purchase = order.total_margin - order.purchase_delivery_amt
if order.amount_untaxed == 0:
- order.total_percent_margin = 0
+ order.percent_margin_after_delivery_purchase = 0
continue
if order.shipping_cost_covered == 'indoteknik':
delivery_amt = order.delivery_amt