summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/commision.py2
-rw-r--r--indoteknik_custom/models/coretax_fatur.py5
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'