Need Help: Setting a Fixed Eco-Tax Amount Per Product Instead of Percentage

Hi everyone,

I’m currently using ERPNext version 15, and I’ve encountered an issue while trying to implement an eco-tax for my products. In my country (France), the eco-tax is a fixed amount per product (e.g., €0.50 per item, €10 per unit, etc.), but ERPNext only seems to support tax calculations as a percentage of the product price.

Is there a workaround (via scripting or configuration) to calculate and add a fixed tax amount dynamically based on the product’s taxe field?

Any help or guidance would be greatly appreciated!

Thanks in advance!

I think you’ll need a customization.

How many items have unique tax amounts?
In the Sales Invoice, do you need to list each item’s tax separately, or can the total amount be used for eco-tax = total of all eco-taxes?

I think you’ll want to create an ‘Eco Tax’ doctype with at least two fields (item,eco_tax_amoutn). You can then create a Sales Taxes and Charges template
using actual as the type and your eco tax as the account head. Leave the amount
at zero.

In sales invoice, delivery note, and sales order doctypes you’ll need a script that will pull the tax amounts from your eco-tax doctype and assign the total against your Sales Taxes and Charges Template item.

I would start with a button so you can see the amounts before submit. Once you are happy you can make the action before_submit.

Hopefully, you can use the total to eco-tax because if you have many items with eco-tax on an invoice you’ll have a 1:1 relation of tax lines to items with eco-tax.

Taxes and Charges are not only Rate based. There are other alternatives as well: maybe included in the sales price, deducted, added for valuation or fixed amount based many things.
Please check the templates and alternative in the saes taxes and charges rows. There are already all the alternatives possible.

@volkswagner I don’t think you have a clear picture of the module. No customization or developments are needed IMHO for the requirements mentioned above.

As a sound approach, I would bleed to death before attempting any coding or customizations on such modules where applications are highly standard.

While I’m confident Item Tax only offers rate based options, I’m truly confused by the blood reference.

I think you are unaware of the difference between Item Tax and Sales Taxes and Charges.

You know, it’s a struggle with the customer during the implementation. A battlefield… their legacy processes and applications versus your offering via ERPNext.

If there is a fixed fee, you can include that in your template and reflect it. Maybe I’ve got the case wrong? The tax template do not need to be a single line.

Here we manage more complex taxes lile 30% is deducted as a separate expense and taxes being calculated over the deducted amount.

Hello thanks for the replys, please find how ecotax waas in France :

  1. Definition of Eco-Tax
    The eco-tax in France is a fee applied to certain products, primarily those that have a significant environmental impact during their lifecycle (e.g., furniture, electronics, bedding). It is intended to fund the recycling and waste management of these products.

  2. Legal Obligations for Businesses
    Businesses in France are legally required to display the eco-tax on all relevant documentation, including:

Quotes (devis)
Orders (commandes)
Invoices (factures)
This ensures transparency for the consumer, allowing them to see the contribution made toward environmental efforts.

  1. How the Eco-Tax Should Be Displayed
    For each product subject to the eco-tax:

Separate Column for Eco-Tax:
Each product line must include a specific column displaying the eco-tax amount (usually labeled as “Éco-participation” or “Eco-tax”).

Individual Tax Display:

The eco-tax must be shown per product, not as a lump sum.
For example:
Product: Mattress
Price: €200
Eco-tax: €5
Total Line: €205
Total Eco-Tax:

At the bottom of the document, a total eco-tax line must summarize all the eco-taxes applied on the products.
4. Eco-Tax Integration on Different Documents
Here’s how it should look on each type of document:

Quote (Devis):

The eco-tax should be clearly shown for each item in the quote and included in the total price.
A note should specify that the tax funds recycling initiatives.
Order (Commande):

When confirming an order, the eco-tax must be consistent with what was shown in the quote.
Invoice (Facture):

The invoice must separately itemize the eco-tax in the same manner as the quote/order.
VAT (TVA) is applied after adding the eco-tax to the product price.
5. Example Layout
Here’s an example layout for an invoice or quote:

Product Name Quantity Unit Price (excl. tax) Eco-Tax Total (excl. tax) VAT (20%) Total (incl. tax)
Mattress A 1 €200.00 €5.00 €205.00 €41.00 €246.00
Pillow B 2 €30.00 €2.00 €64.00 €12.80 €76.80
Total €7.00 €269.00 €53.80 €322.80
6. Additional Notes
Non-negotiable: The eco-tax amount is fixed by law and cannot be discounted.
Labeling: Clearly label the column as “Éco-participation” or “Eco-tax” to ensure compliance.
Consumer Awareness: Consider adding a short note on documents explaining the purpose of the eco-tax to promote transparency.

Thats why i need put tax link with product and taxe

To my undertanding eco tax in France is set per item group? Say 20EUR per mattress, 3EUR per pillow, 45EUR per washing machine. Is it?

Yes, eco tax was set by size of mattress. For exemple : mattress size 120x190x10 i need add eco taxe 3€ tax free. Another mattress size 140x190x14 i need eco tax 5€ tax free. And for order, quotation or invoice i need in total eco tax. I hop i’m clear

And how is that determined? Can you address this to item groups? Say there is the Mattresses Item Group which is a group and there are Item Groups (which are not groups) under Mattresses, according to mattress sizes as per differences in eco tax? So that we can assign a taxing scheme via the item group.

I am trying to add a product group and add a tax for the group, but the tax for the product works with a percentage not an amount. the amount is set by an organization

Are you able to use an item group to specify the eco-tax? You can try using the Sales Taxes and Charges template + Tax Rules for each item group. You would then create a custom print format to add the eco-tax to each line item in sales order, delivery note, sales invoice doctypes. You’ll need error checking to make sure the sum of the individual amounts = total eco-tax. You’ll also want to customize the doctype print format for the total of the eco-tax because it will generate a 1:1 relation to the number of item groups in the sales document.

Consider you can group your items by the tax amount (.50, 2.00, 5.00). Group all items that have an eco-tax @.50 and create a tax rule for each unique tax amount.

Item group tree may look like ‘All Items’ > products > eco-tax-.50

Go to sales taxes and charges template. You will see at the child table to define taxes with fixed amounts. Select Actual and enter the relavant tax account and fixed tax charge to be applied. Give a name. Assign it to the Items or Item Groups. Please note definition on the Item is higher priority so it will be applied.
You can define composite tax structures like VAT as a percentage and a fixed amount or different percentage taxes. Go figure.