summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/coretax_fatur.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-01-14 09:39:12 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-01-14 09:39:12 +0700
commitfe9c85d0bc084e7787f348756c00864b5e239971 (patch)
treef6950d20e8a9d65fcfcc45fb1bd5e6dbdac0c621 /indoteknik_custom/models/coretax_fatur.py
parentecc4356b7ac5ae14d4e86039589716fa76161230 (diff)
parent6dda865a1b3262ce78ed2db024fd03efb091d6a6 (diff)
Merge branch 'odoo-production' into CR-mbaZila
# Conflicts: # indoteknik_custom/security/ir.model.access.csv
Diffstat (limited to 'indoteknik_custom/models/coretax_fatur.py')
-rw-r--r--indoteknik_custom/models/coretax_fatur.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py
index 74f9c8b7..ff8606b1 100644
--- a/indoteknik_custom/models/coretax_fatur.py
+++ b/indoteknik_custom/models/coretax_fatur.py
@@ -61,9 +61,9 @@ class CoretaxFaktur(models.Model):
ET.SubElement(tax_invoice, 'FacilityStamp')
ET.SubElement(tax_invoice, 'SellerIDTKU').text = '0742260227086000000000'
ET.SubElement(tax_invoice, 'BuyerTin').text = buyerTIN
- ET.SubElement(tax_invoice, 'BuyerDocument').text = 'TIN' if invoice.partner_id.npwp else 'Other ID'
+ ET.SubElement(tax_invoice, 'BuyerDocument').text = 'TIN' if sum(int(char) for char in buyerTIN) > 0 else 'Other ID'
ET.SubElement(tax_invoice, 'BuyerCountry').text = 'IDN'
- ET.SubElement(tax_invoice, 'BuyerDocumentNumber').text = '-'
+ ET.SubElement(tax_invoice, 'BuyerDocumentNumber').text = str(invoice.partner_id.id)
ET.SubElement(tax_invoice, 'BuyerName').text = invoice.partner_id.nama_wajib_pajak or ''
ET.SubElement(tax_invoice, 'BuyerAdress').text = invoice.partner_id.alamat_lengkap_text or ''
ET.SubElement(tax_invoice, 'BuyerEmail').text = invoice.partner_id.email or ''