|
|
Member Since: Jun 06, 2006
Posts: 1,153
Mac Specs: MacBook 2.0GHz White, 512MB RAM, 60GB HDD
|

11-15-2006, 07:29 PM
Incidentally, the problems you are having with the magnitude of the VAT value is simple; the equation is incorrect:
PHP Code:
$vat1 = 100 / 100 + $vat * $total1
the (100 / 100) reduces to 1, which means you get:
PHP Code:
$vat1 = 1 + ($vat * $total1)
In other words, 17.5 multiplied by your total, plus 1. I think you were aiming for:
PHP Code:
$vat1 = $total1 * ($vat / 100)
|
|
|
QUOTE
Thanks
|