VAT to Grand Total is calculated twice

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();
    		$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!


I couldn’t find this method “_recalculate()” in oxPrice class.

oxid has no built in country specific vat, probably the module, which is doing country specific vat, is not working properly.

Also, another problem is that I cannot test with Credit Card payment method. Is there any way to come to the paying side of the provider with some fake credit card.

Because I’ve tried with a lots of credit cards that found on the internet, but without success.

Thank you!

this question was already asked yesterday by your coworker and also answered.

1 Like