Taxes vary per Item Serial Number


I am looking for the solution of a particular problem:
Our business is the purchase of used electronic goods and reselling them after repair.

In Europe, refurbished and repaired items are taxed differently to others:
Instead of having a fixed VAT rate, the VAT is calculated on the margin.

An Example:

  • 10€ Used Product
  • 5€ Repair
    15€ Total Cost

If I sell the good now for 25€, I have to apply VAT on the difference:
25€ Sales Price - Total Costs = 10€
10€ = 8.2€ Margin + 22% VAT

Has anybody an idea how to implement this kind of variable taxation?



What country in Europe? Weekday you have is something like a reverse charge tax on the margin. At the time of the sale you might not have tho show the tax else the customer can calculate the margin you are making. Therefore you might have to do your tax at the time of filling. Here you should calculate the total gross margin and then divide it by (1+%x) where the x is rate. Hope that helps.

Hi Deepak,

I will take a look into the gross margin.

Thank you, that’s a good first step.


Hi Deepak,

First thank you for your reply. It helped us a lot.

I think you gave me the right direction, but now I need help to figure out how to execute it:
I figured if we create a Bill of Materials and make a manufacturing step for every device we get the gross margin. But how would you implement the tax in the invoices?

I saw that the taxes can only be applied to rows or net totals, how do I create a tax calculated against an expense account for a tax on gross profit?


Hi Fabian, do it offline. Export all your sales where you have refurbished items. And calculate once a month or however often you need to file taxes and pay your dues in an excel. Margin = Sales - (COGS (assuming perpetual inventory) + Service Costs)

On the margin M, then Tax (M) = M/1.22 (assuming VAT = 22%)

I think this should do it. You could safely ignore printing this on each invoice.
Not sure if it is required.


Hi Deepak,

unfortunately we are legally required to print it on every invoice.

If I understood you correctly, I could create a new field and populate this script with the value if the item fulfills a certain condition. Is that correct?

Our category of items with this special VAT don’t have any other type of charge.