View Issue Details

IDProjectCategoryView StatusLast Update
0005405OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2023-11-21 09:30
Reporterequinox Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version4.7.7 / 5.0.7 
Summary0005405: Basket Payment Method VAT not shown on negative paymethod surcharges
Descriptionset -2% or abs negative for pay method in oxid admin, i.e. for payadvance method.
use this method in checkout and note that the vat-price for pay method costs is not shown when negative, only when positive.

see related and dupe tix: they state that the calc would be wrong, but the calc is 100% correct. The wrongly suggested issue would be that the "incl. 19% vat price" is wrong as it would have to contain the vatprice of the paymethod.
This assumption is wrong, as the "incl. 19% vat-price" under article price is the vat-price for the articles ONLY, NOT the TOTAL order vat-price!
This wrong assumption might be triggered in some people as the "incl. 19% vat-price" under article price is the only 19% vat-price shown.

So there is nothing incorrect in there, just that on negative paymethod vat, that it is not shown, only on positive. This must be fixed nothing else.

I will attach code fix instructions shortly.

cheers!
Steps To Reproduceset -2% or abs negative for pay method in oxid admin, i.e. for payadvance method.
use this method in checkout and note that the vat-price for pay method costs is not shown when negative, only when positive.
TagsDiscount, Payment, VAT
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Relationships

related to 0005396 resolvedmartinwegele Payment Method -> Price Surcharge/Reduction - VAT is not calculated right 

Activities

equinox

2013-09-12 12:19

reporter   ~0009076

Last edited: 2013-09-12 12:36

this ticket is related to 0004712 and the final answer to that and its related and dupes.

equinox

2013-09-12 12:31

reporter   ~0009077

Bugfix instructions:

ori method in models/oxpayment:
--
    public function getPayCostVat()
    {
        $dPayVAT = $this->getCosts( 'oxpayment' )->getVatValue();

        // blShowVATForPayCharge option will be used, only for displaying, but not calculation
        if ( $dPayVAT > 0 && $this->getConfig()->getConfigParam( 'blShowVATForPayCharge' ) ) {
            return oxRegistry::getLang()->formatCurrency( $dPayVAT, $this->getBasketCurrency() );
        }
        return false;
    }
--

bugfix:
change
  "if ( $dPayVAT > 0 && "
to
  "if ( $dPayVAT != 0 && "



ori method in models/oxbasket:
--
    public function calculate( $oBasket )
    {
        //getting basket price with applied discounts and vouchers
        $dPrice = $this->getPaymentValue( $this->getBaseBasketPriceForPaymentCostCalc( $oBasket ) );

        if ( $dPrice ) {
            // calculating total price
            $oPrice = oxNew( 'oxPrice' );
            if ( !$this->_blPaymentVatOnTop ) {
                $oPrice->setBruttoPriceMode();
            } else {
                $oPrice->setNettoPriceMode();
            }

            $oPrice->setPrice( $dPrice );
            if ( $dPrice > 0 ) {
                $oPrice->setVat( $oBasket->getAdditionalServicesVatPercent() );
            }

            $this->_oPrice = $oPrice;
        }

    }
--

bugfix:
change
  "if ( $dPrice > 0 ) {"
to
  "if ( $dPrice != 0 ) {"


cheers