I want to fetch the tax rate in the Sales Invoice print format. The tax rates are stored in the Tax Template doctype child table, and I want to add them to the Sales Invoice print format using Jinja.
Hi,
You can use below Jinja code. Please adjust the code according to your need.
{% for row in doc.taxes %}
{% set data_object = json.loads(row.item_wise_tax_detail) %}
{% set key = item.item_code %}
{% set tax_amount = frappe.utils.flt(data_object[key][0]/100 * item.amount/doc.conversion_rate, row.precision('tax_amount')) %}
Thanks,
Divyesh Mangroliya