Specific Tax on products

Grettings

In Chile we have some specifics taxes on certain products (for example, any product with sugar applies a tax of 18%) and in my Dolibarr system I need to specify that on the bill / facture

There’s a way to do that? Any module or code snippet? This is my first time coding for Dolibarr but I was thinking to use triggers when someone inserts the product that are affected with the tax, but it could be done on another way, any suggestion?

If I understand your question correctly then you can have many tax rates for that country ( setup-dictionaries - VAT , tax rates). then you can choose correct VAT for that particular product