diff options
| -rw-r--r-- | indoteknik_custom/models/coretax_fatur.py | 7 |
1 files 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 |
