Questions About Taxes in ERPNext

Hello, Guys! I hope you’re doing well!

I one question about Taxes and ERPNext:

I checked that ERPNext don’t consider the taxes attached to an Item, during the creation of a Sales Order/Invoice for eg: https://demo.frappecloud.com/desk#Form/Sales%20Order/SO-00141 (each item have tax included)
It is the expected behavior?

@max_morais_dmm

Hey! After a long time, hope you also doing well.

First of all, in given example, you have selected charge type as “Actual”, it does not consider item-wise tax rate.
And for other types, even if you mentioned tax rate in item master, you have to add applicable taxes in the Sales Order with tax_rate as zero.

You can also check https://erpnext.com/user-guide/accounts/item-wise-tax

Thanks, Nabin!

I’m fighting with ERPNext, to it understand my crazy local taxes!

I got your point, but, I’m confused with one question:

For each item, I need calculate the ICMS + ICMSST + IPI + PIS + PISST + COFINS + COFINSST+ II, and in the body of Order, I need show in table taxes a total of these taxes, for example:

Google Sheet

Is possible do it in any way in ERPNext?

Hey Max,

Longest time! Hope all is well.

Setting up taxes as described in the spreadsheet is surely achievable in the ERPNext. You should go about setting up master in this order.

  1. Creating Accounting Ledger for each Tax

To add new accounting ledger, go to:

Accounts >> Documents >> Chart of Account

You should add tax ledger under:

Liabilities >> Current Liabilities >> Duties and Taxes

Click on Duties and Taxes to see “Add Child” option. Click on Add Child to add new tax ledger. Check following link for more help on setting up your chart of account master.

https://erpnext.com/user-guide/accounts/chart-of-accounts

  1. Setup Sales Taxes and Charges Master

You can create a tax master where all the taxes will be listed in a required order. In the sales transactions, on selection of the tax master, you will have all the taxes fetched in your selling transaction, and taxes will be calculated for each item.

To create Sales Taxes and Charges master, go to:

Selling >> Setup >> Sales Taxes and Charges master

To setup Purchase Taxes and Charges master, go to:

Purchase >> Setup >> Purchase Taxes and Charges master

Check following link for more help in setting up Sales/Purchase Tax master.

https://erpnext.com/user-guide/setting-up/setting-up-taxes

Hope this answers your query.

Hey @umair, Yep, is a long time! :blush:

Thanks for clarify!

I was looked to It, but in my case, it can’t solve my problem :weary:

But, no problems, I was expecting it! The rules for taxation is very complex and needs a specific solution to calculate it.

The tax calculation is afected by Regions (Exportation, Importation and between states of Brazil too)
Is affected by fiscal rules called (Codes for Fiscal Operations)
In certain conditions IPI is included in the base of ICMS
For a group of companies these taxes are calculated by the value of the item in transaction,
For another group it is calculated by the amount billed in the last fiscal year

@max_morais_dmm - good to see you back!

Hey @umair, I’m reopening this thread because I still with doubts :persevere:

Relationed about the model of taxes that I was showed in the last messages, I have some doubts:

Suppose:

For IPI i have 2 sub-types - IPI Purchase and IPI Selling and above each I have many childs
IPI Selling 15%
IPI Selling 25%
IPI Purchase 10%
IPI Purchase 28% and others

So, the first question is how I can manage the Item Tax in Sales Invoices and In Purchase Invoices, if I only have one table in Item for write the taxes.

Second question is:
I have PIS and COFINS that are taxes attached to the head of Company, the PIS and COFINS only change between companies, is possible to manage that, and auto fetch it in a Item during the Item creation?

The third question is:
@rmehta, @nabinhait I think that this question is more apropriated to you two:

How i can change the way of calculation of the tax is made?
I my case I have too many vars to consider in the body of the tax, eg: Increase %, Decrease %, and the tax needs consider these variables based in a group of informational variables. (PS I know that the tax have the options Add or Deduct, but In many cases I need both)

I’m thinking if is possible manage the tax calculation using a hook. Maybe in tax master I can have one field that inform the hook that is used to compute the tax

Sorry Guys for my silly questions but the amount of :hankey: that is the brazilian tax system, can f*ck every good ERP. :tired_face:

Note: In the link, you can see that in the item detail, I need create a Fold, and inside this fold are u seeing the basic variables to calculate the brazilian taxes in normal conditions, because based in another rules, I need hide or display many others groups of fields to use in tax. Crazy no :scream:

Hello Max,

Inline replies below.

For IPI i have 2 sub-types - IPI Purchase and IPI Selling and above each I have many childs
IPI Selling 15%
IPI Selling 25%
IPI Purchase 10%
IPI Purchase 28% and others

This is how you should setup your tax ledgers in your account -

So, the first question is how I can manage the Item Tax in Sales
Invoices and In Purchase Invoices, if I only have one table in Item for
write the taxes.

**Not sure what you mean by “I only have one table in Item for write the taxes”. Is it that you can select only one tax ledger in the Item?

As specified in the itemwise tax calculation system (link shared above), you should specify all the taxes application on the item in the Item Tax able.

While creating transaction, you can remove specific tax type from the Tax and Other Charges table, if you don’t what that tax to be applied in this invoice. Then that tax will not be applied, even if mentioned in the Item Tax table.**

Second question is:

I have PIS and COFINS that are taxes attached to the head of Company, the PIS and COFINS only change between companies, is possible to manage that, and auto fetch it in a Item
during the Item creation?

Firstly, items are independent of the company. Perhaps you will need to insert a Custom Link Field of Company, if item for each Company separate.

Secondly, default value can be updated in the field on parent form. In this case, since default value will be changing based on the value in the Company field, I believe it will require some custom scripting.

Will let our developer comment on this, and third issue (about hooks).