diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-11-11 01:50:42 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-11-11 01:50:42 +0000 |
| commit | 54df0a591ed5ff2bb526681ab9f5c04acadf07cc (patch) | |
| tree | 2fd9a961146165247ade5c8e4fe7249bc2051b20 | |
| parent | d90cf677f54397aa39ec6f8b2730224056eb2ac6 (diff) | |
| parent | 1554163f079ad816279ddbf2a244327e4e0b89c1 (diff) | |
Merged in uom_coretax_xml (pull request #460)
<Miqdad> set uom faktur xml based on coretax id
| -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 ce94306f..7e0de919 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -147,6 +147,8 @@ class CoretaxFaktur(models.Model): subtotal = line_price_subtotal quantity = line_quantity total_discount = round(line_discount, 2) + coretax_id = line.product_uom_id.coretax_id + uom_name = line.product_uom_id.name # Calculate other tax values otherTaxBase = round(subtotal * (11 / 12), 2) if subtotal else 0 @@ -159,7 +161,7 @@ class CoretaxFaktur(models.Model): 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, uom_name).text = coretax_id # 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) |
