summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-09-04 17:12:51 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-09-04 17:12:51 +0700
commitcf52a49f77c744c47f2f2f3d807a1dafcd8733ee (patch)
treea68f6dcc2566c17be8e7eefbd935d524b1a1c29e
parent1bb074bb8f63072fb990c57c18986c50981f1402 (diff)
parentca5c12f1ee40ea3c34cafcc9fe73d3d79a6a5b98 (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
-rwxr-xr-xindoteknik_custom/views/sale_order.xml1
2 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 0268f27b..b6759306 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -746,7 +746,7 @@ class SaleOrder(models.Model):
delivery_amt = order.delivery_amt
else:
delivery_amt = 0
- order.total_percent_margin = round((order.total_margin / (order.amount_untaxed-delivery_amt)) * 100, 2)
+ order.total_percent_margin = round((order.total_margin / (order.amount_untaxed-delivery_amt-order.fee_third_party)) * 100, 2)
# order.total_percent_margin = round((order.total_margin / (order.amount_untaxed)) * 100, 2)
@api.onchange('sales_tax_id')
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 44070f35..58b67348 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -123,6 +123,7 @@
"/>
<field name="purchase_tax_id" attrs="{'readonly': [('parent.approval_status', '!=', False)]}" domain="[('type_tax_use','=','purchase')]"/>
<field name="item_percent_margin"/>
+ <field name="item_margin" optional="hide"/>
<field name="note" optional="hide"/>
<field name="note_procurement" optional="hide"/>
<field name="vendor_subtotal" optional="hide"/>