summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-01-10 10:05:04 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-01-10 10:05:04 +0700
commit25748d7a8d537ffe6a3e905f59f05a4d737499d9 (patch)
tree2c9fedcd797322a9086c5a0b6b66681139914713
parent893fbb7a4d1467686c4de435393f1162c4d04bd7 (diff)
bug fix add tax in purchase pricelist if not have tax in purchase order
-rwxr-xr-xindoteknik_custom/models/purchase_order.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 3c446fa7..44af8976 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -100,15 +100,19 @@ class PurchaseOrder(models.Model):
for line in self.order_line:
i += 1
current_time = datetime.utcnow()
- print(i, len(self.order_line))
+ # print(i, len(self.order_line))
price_unit = line.price_unit
taxes = line.taxes_id
for tax in taxes:
tax_include = tax.price_include
tax_amt = tax.amount
if taxes:
- if not tax_include:
+ if tax_include:
price_unit = price_unit + (price_unit * tax_amt / 100)
+ else:
+ price_unit = price_unit + (price_unit * 11 / 100)
+ else:
+ price_unit = price_unit + (price_unit * 11 / 100)
purchase_pricelist = self.env['purchase.pricelist'].search([
('product_id', '=', line.product_id.id),