diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-15 14:25:36 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-15 14:25:36 +0700 |
| commit | 4aa7c5af3bd15ca382fe72fbfea416c169d58ebf (patch) | |
| tree | 759a64f08f54576bad1ca8b120c9dbf28cccf151 /indoteknik_custom/models/coretax_fatur.py | |
| parent | 4ad4ee17e29d9583b1d2da76af93a1c28fbc8874 (diff) | |
<iman> add nitku
Diffstat (limited to 'indoteknik_custom/models/coretax_fatur.py')
| -rw-r--r-- | indoteknik_custom/models/coretax_fatur.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py index ff8606b1..f0043884 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -49,7 +49,9 @@ 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) - buyerIDTKU = buyerTIN.ljust(len(buyerTIN) + 6, '0') if sum(int(char) for char in buyerTIN) > 0 else '000000' + nitku = invoice.partner_id.nitku + formula = nitku if nitku else buyerTIN.ljust(len(buyerTIN) + 6, '0') + buyerIDTKU = formula if sum(int(char) for char in buyerTIN) > 0 else '000000' # Tambahkan elemen faktur ET.SubElement(tax_invoice, 'TaxInvoiceDate').text = invoice.invoice_date.strftime('%Y-%m-%d') if invoice.invoice_date else '' |
