diff options
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 9cc95e57..ae769ae7 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -306,15 +306,15 @@ class SaleOrder(models.Model): order.total_percent_margin = 0 continue total_margin += line.item_margin - sales_price = line.price_reduce_taxexcl * line.product_uom_qty - if line.order_id.shipping_cost_covered == 'indoteknik': - sales_price -= line.delivery_amt_line - if line.order_id.fee_third_party > 0: - sales_price -= line.fee_third_party_line - sum_sales_price += sales_price + # sales_price = line.price_reduce_taxexcl * line.product_uom_qty + # if line.order_id.shipping_cost_covered == 'indoteknik': + # sales_price -= line.delivery_amt_line + # if line.order_id.fee_third_party > 0: + # sales_price -= line.fee_third_party_line + # sum_sales_price += sales_price order.total_margin = total_margin if order.amount_untaxed > 0: - total_percent_margin = round((total_margin / sum_sales_price), 2) * 100 + total_percent_margin = round((total_margin / order.amount_untaxed), 2) * 100 order.total_percent_margin = total_percent_margin def compute_count_line_product(self): |
