summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrisusilo <tri.susilo@altama.co.id>2025-01-13 07:28:19 +0000
committertrisusilo <tri.susilo@altama.co.id>2025-01-13 07:28:19 +0000
commitb475576d635a14d905822cfdba58729f9691e385 (patch)
tree2d97d75bc09b3f10b0715ffaf0a092e4b99c4e15
parent39833cf74f4b99d85c4f6090684ff19235a6e219 (diff)
parent14a677c77defd6f5c92af2db6f128e3f7227ddf6 (diff)
Merged in feature/coretax_export_fakture (pull request #261)
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 ''