News:

Support the VirtueMart project and become a member

Main Menu

Price modifier before tax shows wrong sign on frontend

Started by Margriet, April 14, 2015, 10:12:16 AM

Previous topic - Next topic

Margriet

Joomla 3.4.1, VM 3.0.6.4
When using price modifier before tax to add i.e. Insurance costs, calculation works like it should, but in stead of showing either a + sign on frontend or nothing it shows a - sign.
Small detail: There is a text Welcome to, I think this should be Description.

Margriet

Did some research, but as I'm not a programmer I'm not sure if this is correct. But it seems to be caused by /administrator/components/com_virtuemart/helpers/calculationh.php from line 423 and onwards.
if(empty($this->rules['DBTax'])){
$this->productPrices['discountAmount'] = $this->roundInternal($basePriceWithTax - $this->productPrices['salesPrice']) * -1;
} else {
$this->productPrices['discountAmount'] = $this->roundInternal($this->productPrices['discountedPriceWithoutTax'] - $this->productPrices['basePriceVariant']) * -1;
}

If I change the multiplier from -1 to 1 it seems to work like expected.