From 73296b2a5e1baaa29770d4d91482c95d93740572 Mon Sep 17 00:00:00 2001 From: Mqdd Date: Mon, 1 Dec 2025 09:31:53 +0700 Subject: uom bquick in invoice always unit in coretax xml --- indoteknik_custom/models/coretax_fatur.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py index 755c5cc3..d93ca7b7 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -117,7 +117,7 @@ class CoretaxFaktur(models.Model): ) # Calculate totals - total_product_amount = sum(line.get('price_subtotal', 0) if isinstance(line, dict) + total_product_amount = sum(line.get('price_subtotal', 0) if isinstance(line, dict) else line.price_subtotal for line in product_lines) if total_product_amount == 0: total_product_amount = 1 # Avoid division by zero @@ -153,7 +153,10 @@ class CoretaxFaktur(models.Model): else: uom = line.product_uom_id - coretax_id = uom.coretax_id if uom else '' + coretax_id = uom.coretax_id if uom else 'UM.0018' + bquick_id = 80007 + if invoice.partner_id.id == bquick_id: + coretax_id = 'UM.0018' # coretax_id = line.product_uom_id.coretax_id # Calculate other tax values -- cgit v1.2.3