We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I asked sometiem back about how to calculate TAX on a PDF invoice.
My accountant states that there is some issues, which is basically under €300 the tax rate is 0% and above is 9%.
Is there a way to have it write a calculation to take the field (let's say it's called 'subtotal' and the tax field is called 'tax') and to have it calculate and display the options based on the if it is above or below 300?
So, something like:
if subtotal<300 tax=0 else tax=subtotal*0.9 or something like that?
Thanks in advance
Sorry, I am not mathematically minded 🙂
You want to show result in 'tax' field or some other field like 'total'?
I believe Nesa may have hit it on the nail.
If I understand you right, use this as custom calculation of "tax" field:
if(this.getField("subtotal").value >= 300)
event.value = this.getField("subtotal").value*0.9;
else event.value = 0;
I will check this out and let you know. Thanks.
OK, it seems to be showing the subtotal minus the tax. I need it to show the amount of 9% as an addition to the subtotal. So, 9% of the subtotal, which will then be added in the grand total field.
If that makes sense.
The code above is wrong, anyway. If you multiply by 0.9 you get the result of 90% tax, not 9%. You need to multiply by 0.09 for that. If you want to show the total plus tax then multiply by 1.09.
My mistake I need it to be 0.09 and that works fine.
You should also find out the rules for rounding tax, and make sure you follow them. Accountants get very picking about fractions of a cent.