View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005405 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2013-09-12 12:17 | 2023-11-21 09:30 |
Reporter | equinox | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 4.7.7 / 5.0.7 | ||||
Summary | 0005405: Basket Payment Method VAT not shown on negative paymethod surcharges | ||||
Description | set -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 Reproduce | set -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. | ||||
Tags | Discount, Payment, VAT | ||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
related to | 0005396 | resolved | martinwegele | Payment Method -> Price Surcharge/Reduction - VAT is not calculated right |
|
this ticket is related to 0004712 and the final answer to that and its related and dupes. |
|
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 |