Jump to content

VAT and TAX function


paul2463

Recommended Posts

Hello Guys

this is not for any shopping cart system or any rebuilding or other peoples work it started off as a bit of fun as someone asked how it was done and I cannot for the life in me figure out how to do it.
[code]
to add UK VAT onto a price (presently 17.5%)
$unitPrice = 10.50;
$totalPrice = round(($unitPrice*1.175), 2);
echo $totalprice;
[/code]

does anyone have the faintest idea how you get it to work out how much was paid in tax if you only had $totalprice to work with?
if you take 17.5% off the $totalprice it doesnt work.

any help gratefully recieved
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.