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 | |
| parent | e30c678ed5eb53f67d95d02645f6662462ec07d0 (diff) | |
(andri) fix price coretax & penamaan field cust benefits
| -rw-r--r-- | indoteknik_custom/models/commision.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/coretax_fatur.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 4db6c009..97184cdb 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -178,7 +178,7 @@ class CustomerCommision(models.Model): ], string='Status') # commision_percent = fields.Float(string='Commision %', tracking=3) - commision_percent = fields.Float(string='Persentase', tracking=3) + commision_percent = fields.Float(string='Persentase (%)', tracking=3) # commision_amt = fields.Float(string='Commision Amount', tracking=3) commision_amt = fields.Float(string='Amount', tracking=3) 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' |
