diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-06-26 08:44:24 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-06-26 08:44:24 +0700 |
| commit | 27926566ef6fee5a5a4be9c4cfcaddc6edfa23a9 (patch) | |
| tree | 1172b2d5390e207aaf9e2c1137f5a5a70ce6bde4 /indoteknik_custom/models/coretax_fatur.py | |
| parent | e30c678ed5eb53f67d95d02645f6662462ec07d0 (diff) | |
(andri) fix price coretax & penamaan field cust benefits
Diffstat (limited to 'indoteknik_custom/models/coretax_fatur.py')
| -rw-r--r-- | indoteknik_custom/models/coretax_fatur.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py index 54eb0f8e..9b1544d3 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -148,13 +148,16 @@ class CoretaxFaktur(models.Model): otherTaxBase = round(subtotal * (11 / 12), 2) if subtotal else 0 vat_amount = round(otherTaxBase * 0.12, 2) + price_per_unit = round(subtotal / quantity, 2) if quantity else 0 + # Create the line in XML good_service = ET.SubElement(list_of_good_service, 'GoodService') ET.SubElement(good_service, 'Opt').text = 'A' ET.SubElement(good_service, 'Code').text = '000000' ET.SubElement(good_service, 'Name').text = line_name ET.SubElement(good_service, 'Unit').text = 'UM.0018' - ET.SubElement(good_service, 'Price').text = str(round(line_price_unit, 2)) if line_price_unit else '0' + # ET.SubElement(good_service, 'Price').text = str(round(line_price_unit, 2)) if line_price_unit else '0' + ET.SubElement(good_service, 'Price').text = str(price_per_unit) ET.SubElement(good_service, 'Qty').text = str(quantity) ET.SubElement(good_service, 'TotalDiscount').text = str(total_discount) ET.SubElement(good_service, 'TaxBase').text = str(round(subtotal)) if subtotal else '0' |
