summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrisusilo <tri.susilo@altama.co.id>2025-01-13 09:48:53 +0000
committertrisusilo <tri.susilo@altama.co.id>2025-01-13 09:48:53 +0000
commit46e968a3b28c00aa74e6f09b451d5a87e8523043 (patch)
treeeda13d7e24a04e064e032c9bec994bc0d8e09f24
parentebb101b78f930cdce77c418edbe73ffda6dd5de9 (diff)
parentefefae8a0bdb05f36e0aeee9d06927a55fe648a6 (diff)
Merged in feature/coretax_export_fakture (pull request #263)
Feature/coretax export fakture
-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 ''