To download this file, please login or click here to register
Description:
This function is a simple PHP VAT calculator. It will calculate the 17.5% UK sales VAT (Value Added Tax) on an amount and then round the price to two (2) decimal places. For example, £5.95 would be £6.99125 with VAT added, which would be rounded to £6.99. The amount of vat can be altered to any amount of sales tax, so you can calculate a new price for any string using any percentage. This could come in useful if you needed to calculate the tax on a product in a shopping cart script.