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
https://forums.phpfreaks.com/topic/28509-vat-and-tax-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.