I am using opencart 2.1.x and facing issue in price calculations.
Below is the scenario that i am currently on
Product Price: 503 (without VAT)
Special Price: 428 (15% Off) [Without VAT]
While Showing prices in store, VAT(5%) is added automatically as expected
Product Price: 525 (with VAT) (actual value: 528.15)
Special Price: 449 (15% Off) [With VAT] (actual value: 449.4)
Till here everything works well (upto Product Detail Page)
Issue comes up when product is added to Cart and quantity is changed in Cart.
product rate
is shown as 449
and when it is multiplied by 2 then cost shall come as 898
but right now it is showing up as 899
because449
, which is wrongMultiplication is done as (449.4*2) NOT (449*2)
Is there any solution to resolve this?
I thought of rounding up the Tax Calculation in Cart as below
$this->currency->format(round($this->tax->calculate($product['price'],
$product['tax_class_id'], $this->config->get('config_tax'))));
But in this way i have to change many files? Is there any easy wayout for this?