Compounding taxes for UK market

Hi, I need to make quotes and invoices with two taxes.

It will be items subtotal
Then added tax preliminary 8%
then subtotal (items total + preliminary 8%)
And only then VAT 20%
Then total.

At the moment 20% calculates based on items subtotal and ignores the preliminary 8%.

Thanks for ideas or answers.

Hi,

I don’t believe this is currently supported. I think there’s an issue tracking this request on GitHub, you can upvote it to show your interest.

Hi @Mindas

I also need compound taxes but it isn’t supported as well.

I managed to do a work around, but this work around requires you to create a custom invoice design and you would use the “Discount” field as the 1st Tax option.

On the custom invoice design, you would have to add this code into the “Footer” section
In my case, I did not need a second tax, but rather an “admin / handling” fee as a percentage of the invoice.
You can change the last line where I have "Handling Fee - " to the name of your tax.

const discountElement = document.querySelector('[data-ref="totals_table-discount"]');
let textContent = discountElement.textContent;

if (textContent.startsWith('-')) {
    textContent = textContent.substring(1);
    discountElement.textContent = textContent;
}

const subtotalElement = document.querySelector('[data-ref="totals_table-subtotal"]');

const discount = parseFloat(discountElement.textContent.replace(/[^\d.-]/g, ''));
const subtotal = parseFloat(subtotalElement.textContent.replace(/[^\d.-]/g, ''));

const discountPercentage = ((discount / subtotal) * 100).toFixed(2);

const discountLabel = document.querySelector('[data-ref="totals_table-discount-label"]');
discountLabel.textContent = `Handling Fee - ${discountPercentage}%`;

After adding this code to the custom invoice design, save it and make this new design the default. There after all new invoices will follow the new format. You would then put “-8” into the discount field and select VAT as the Tax for the invoice.

Hopefully this helps you and others until the developers make a proper way of doing compound tax.

1 Like