Hello everyone,
In the shop, I have defined 19% VAT for Germany, 20% VAT for Austria and 20% default VAT (If VAT is not defined for some country).
So, in the shop, everything is correct, but for countries for which VAT is different than 20%, (ex. Germany 19%), the 19% VAT is added twice to the grand total. And the problem is that in the shop the price is okay, but when a customer is redirected to paying site from the payment provider, 19% VAT is added again to the grand total.
In my own module, I extended class oxPrice and overloaded this function:
protected function _recalculate()
{
$oUser = $this->getUser();
if($oUser){
$oBasket = $oUser->getSession()->getBasket();
if($oBasket->_SpecificCountryVAT != 20 || $oBasket->_SpecificCountryVAT != '20'){
$this->_dVat = $oBasket->_SpecificCountryVAT;
}
}
if ( $this->_blNetPriceMode ) {
$this->_dBrutto = self::netto2Brutto($this->_dNetto, $this->_dVat);
$this->_dBrutto = oxUtils::getInstance()->fRound($this->_dBrutto);
} else {
$this->_dBrutto = oxUtils::getInstance()->fRound($this->_dBrutto);
$this->_dNetto = self::brutto2Netto($this->_dBrutto, $this->_dVat);
}
}
But parent of the function is not called, so I cannot figure out why is calculated twice.
Thanks for your help!