diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-01-03 15:27:56 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-01-03 15:27:56 +0700 |
| commit | bef3ba4c18d585bc0980942d91b5fcb4d44427e1 (patch) | |
| tree | 81fd05aa82220fa2be7fa12e9ec2461d11cd5961 | |
| parent | 992f530f9da44716361b27e62458c82a8aca78e1 (diff) | |
push
| -rw-r--r-- | indoteknik_custom/models/coretax_fatur.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py index 426fb737..32082774 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -36,32 +36,32 @@ class CoretaxFaktur(models.Model): ET.SubElement(tax_invoice, 'TrxCode').text = '01' ET.SubElement(tax_invoice, 'AddInfo') ET.SubElement(tax_invoice, 'CustomDoc') - ET.SubElement(tax_invoice, 'RefDesc') + ET.SubElement(tax_invoice, 'RefDesc').text = invoice.name ET.SubElement(tax_invoice, 'FacilityStamp') - ET.SubElement(tax_invoice, 'SellerIDTKU').text = '0000000000000000000000' + ET.SubElement(tax_invoice, 'SellerIDTKU').text = '0742260227086000000000' ET.SubElement(tax_invoice, 'BuyerTin').text = invoice.partner_id.npwp or '' ET.SubElement(tax_invoice, 'BuyerDocument').text = 'TIN' ET.SubElement(tax_invoice, 'BuyerCountry').text = 'IND' ET.SubElement(tax_invoice, 'BuyerEmail').text = invoice.partner_id.email or '' - ET.SubElement(tax_invoice, 'BuyerIDTKU').text = '0000000000000000000000' + ET.SubElement(tax_invoice, 'BuyerIDTKU').text = '' # Tambahkan elemen ListOfGoodService list_of_good_service = ET.SubElement(tax_invoice, 'ListOfGoodService') for line in invoice.invoice_line_ids: good_service = ET.SubElement(list_of_good_service, 'GoodService') - ET.SubElement(good_service, 'Opt').text = 'A' + ET.SubElement(good_service, 'Opt').text = 'B' if line.product_id.type == 'service' else 'A' ET.SubElement(good_service, 'Code').text = line.product_id.default_code ET.SubElement(good_service, 'Name').text = line.name ET.SubElement(good_service, 'Unit').text = 'UM.0018' ET.SubElement(good_service, 'Price').text = str(line.price_unit) ET.SubElement(good_service, 'Qty').text = str(line.quantity) - ET.SubElement(good_service, 'TotalDiscount').text = '100000' + ET.SubElement(good_service, 'TotalDiscount').text = str(line.discount) ET.SubElement(good_service, 'TaxBase').text = str(line.price_subtotal) ET.SubElement(good_service, 'OtherTaxBase').text = str(line.price_subtotal) - ET.SubElement(good_service, 'VATRate').text = '11' + ET.SubElement(good_service, 'VATRate').text = '0,11' ET.SubElement(good_service, 'VAT').text = str(line.price_total * 0.11) - ET.SubElement(good_service, 'STLGRate').text = '20' - ET.SubElement(good_service, 'STLG').text = '580000' + ET.SubElement(good_service, 'STLGRate').text = '' + ET.SubElement(good_service, 'STLG').text = '' # Pretty print XML xml_str = ET.tostring(root, encoding='utf-8') |
