RE: [PHP] Re: Need help

From: Date: Wed, 14 Apr 2004 14:10:50 +0000
Subject: RE: [PHP] Re: Need help
Groups: php.general 
Request: Send a blank email to php-general+get-183317@lists.php.net to get a copy of this message
On 09 April 2004 16:39, Strogg wrote: [snip original problem for which a fix has been posted] > $taxrate = 0.175; //local tax rate in UK is 17.5% You should note that UK VAT is always rounded *down*, so that this: > $totalamount = $totalamount * (1 + $taxrate); should be something like: $totalamount += round($totalamount*$taxrate-0.00499, 2); or: $totalamount += floor($totalamount*taxrate*100)/100; Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#183317) next »