Fetch the tax rate in the Sales Invoice print format

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.

@Govind_Gupta check this Get tax rate for customized sales invoice print format

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

i want to get tax rate in item tax template doctpye
which one is present in sales invoice items table
using jinja
ex :
![Screenshot 2024-09-26 173832|690x67]


(upload://tTElULLAUSwqEGYCk9CRwS95F15.png)