fix(india): inflated item tax rate for e-invoicing (#24752)
This commit is contained in:
parent
d7a81be56d
commit
fa777555b7
@ -202,9 +202,11 @@ def update_item_taxes(invoice, item):
|
||||
item[attr] = 0
|
||||
|
||||
for t in invoice.taxes:
|
||||
# this contains item wise tax rate & tax amount (incl. discount)
|
||||
item_tax_detail = json.loads(t.item_wise_tax_detail).get(item.item_code)
|
||||
if t.account_head in gst_accounts_list:
|
||||
is_applicable = t.tax_amount and t.account_head in gst_accounts_list
|
||||
if is_applicable:
|
||||
# this contains item wise tax rate & tax amount (incl. discount)
|
||||
item_tax_detail = json.loads(t.item_wise_tax_detail).get(item.item_code)
|
||||
|
||||
item_tax_rate = item_tax_detail[0]
|
||||
# item tax amount excluding discount amount
|
||||
item_tax_amount = (item_tax_rate / 100) * item.base_net_amount
|
||||
@ -229,7 +231,7 @@ def get_invoice_value_details(invoice):
|
||||
|
||||
if invoice.apply_discount_on == 'Net Total' and invoice.discount_amount:
|
||||
invoice_value_details.base_total = abs(invoice.base_total)
|
||||
invoice_value_details.invoice_discount_amt = invoice.base_discount_amount
|
||||
invoice_value_details.invoice_discount_amt = abs(invoice.base_discount_amount)
|
||||
else:
|
||||
invoice_value_details.base_total = abs(invoice.base_net_total)
|
||||
# since tax already considers discount amount
|
||||
|
Loading…
x
Reference in New Issue
Block a user