summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-01-13 14:27:36 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-01-13 14:27:36 +0700
commit14a677c77defd6f5c92af2db6f128e3f7227ddf6 (patch)
treebc218fd41a3a69bc48cfaf1f2d7edfde02640be7
parentfcefddc96acc561ec13d52e734eaf04b041d4a0b (diff)
update customer non pkp
-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 00a8f5ab..2f85a97f 100644
--- a/indoteknik_custom/models/coretax_fatur.py
+++ b/indoteknik_custom/models/coretax_fatur.py
@@ -44,8 +44,8 @@ class CoretaxFaktur(models.Model):
for invoice in invoices:
tax_invoice = ET.SubElement(list_of_tax_invoice, 'TaxInvoice')
- buyerTIN = self.validate_and_format_number(invoice.partner_id.npwp) if invoice.partner_id.npwp else '0000000000000000'
- buyerIDTKU = buyerTIN.ljust(len(buyerTIN) + 6, '0') if invoice.partner_id.npwp else '000000'
+ buyerTIN = self.validate_and_format_number(invoice.partner_id.npwp) if invoice.partner_id.customer_type == 'pkp' else '0000000000000000'
+ buyerIDTKU = buyerTIN.ljust(len(buyerTIN) + 6, '0') if invoice.partner_id.customer_type == 'pkp' else '000000'
# Tambahkan elemen faktur
ET.SubElement(tax_invoice, 'TaxInvoiceDate').text = invoice.invoice_date.strftime('%Y-%m-%d') if invoice.invoice_date else ''