Need to get one entry of Item tax rate in Purchase Invoice Item form

Okay, So what I need is, in the purchase invoice item Form, a column where the item tax rate is displayed.
If you want to know why, sometimes, when the tax of an item on the supplier provided invoice does not match with the tax rate on our items master, the two invoices end up not tallying, and becomes a pain to track it down.

What I Tried
I tried customizing the Purchase Invoice Item form, and added a field called tax_per.
What I intend to do is, every time an item is entered in the items table, JSON.parse the item_tax_rate field, get the value for ‘IGST - E’ and set it to tax_per field.
But when i try to access the item_tax_rate field, i get undefined error.
I tried writing a custom script on doctype Purchase Invoice.

frappe.ui.form.on(“Purchase Invoice Item”, “item_code”, function(frm,cdt,cdn) {
d = locals[cdt][cdn];

Any Help would be highly appreciated.

Thank You


hi @saeedkola
where is that IGST - E field that you want to fetch when you add a new item ?

it is inside the item_tax_rate field.
But when i try to access the item_tax rate field, it gives me undefined error.

I can’t find it