How to make an 'Item Tax Template' tax included in price

I can’t see a option to make Item Tax Template price included. Is there any options / ways?

Go to Sales Taxes and Charges Template then add new row:

I want to achieve this same thing on ‘Item Tax Template’, not ‘Sales Taxes and Charges Template’

1 Like

Please read this :

https://erpnext.com/docs/user/manual/en/accounts/item-tax-template

Hi I am also looking for tax, which is inclusive of gst in item.

Want this because , at pos level salesman only scan barcode and collect payment.
So I need auto calculate including gst in item price.

Not found solution for below scenario.
Hi I am also looking for tax, which is inclusive of gst in item.

Want this because , at pos level salesman only scan barcode and collect payment.
So I need auto calculate including gst in item price.

@anastes did you get a solution for this?

Yes,
First, create Sales tax templates.
Then ‘Tax Rules’

1 Like

Can you post more detailed information to your solution?

Could you please post a more detailed explanation of how you were able to solve the issue

In order to include the tax in item price using the Item Tax Template, I had to extend the transaction controller as follow:

const CustomTransactionController = erpnext.taxes_and_totals.extend({
	add_taxes_from_item_tax_template: function(item_tax_map) {
		let me = this;

		if(item_tax_map && cint(frappe.defaults.get_default("add_taxes_from_item_tax_template"))) {
			if(typeof (item_tax_map) == "string") {
				item_tax_map = JSON.parse(item_tax_map);
			}

			$.each(item_tax_map, function(tax, rate) {
				let found = (me.frm.doc.taxes || []).find(d => d.account_head === tax);
				if(!found) {
					let child = frappe.model.add_child(me.frm.doc, "taxes");
					child.charge_type = "On Net Total";
					child.account_head = tax;
					child.rate = rate;
					child.included_in_print_rate = 1
				}
			});
		}
	},
});

$.extend(
	cur_frm.cscript,
	new CustomTransactionController({frm: cur_frm}),
);

This could be in erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.js file.
Note the child.included_in_print_rate = 1 line, that makes the trick.

Hope it help.

1 Like

Hey, thank you for the code snippet @roquegv

As far as I can see, the Item-wise taxiation follows the same rules as defined in the Sales/Purchase Taxes and Charges Template. So if you tick the checkmark there, any item tax that overrides a sales/purchase tax will respect that setting.

Just wanted to throw this out in case anyone still has questions about how the logic works.

To extend this topic, what I want to achieve (and I think this is a valid case for many users) is to mix items with exclusive tax and inclusive tax.
But since the checkbox for “include this tas in basic rate” is in Taxes and Charges Template, this mix can’t be done (at least not straightforward).
The checkbox should be in itemize tax in order to allow such mixing.

Edit:
If in Taxes and Charges we tick the Taxes Included in Basic Rate, then all items are calculated with inclusive tax, regardless of the item has Item Tax Template (Item Tax only overwrite rate, not how to calculate)