View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007175 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2020-09-16 22:16 | 2024-11-06 16:17 |
Reporter | timwetter | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Summary | 0007175: wrong VAT calculation with delivery address | ||||
Description | possible wrong VAT calculation with delivery address | ||||
Steps To Reproduce | in backend set blShippingCountryVat = 1 in backend set oxvatstatus for country france to 1 in backend set oxvatstatus for country USA to 0 make order in front-end with bill address in USA and shipping address in france go in backend to the new order go to tab 'article' add same/other article to the order compare the netto prices and the vat percent value qued | ||||
Additional Information | for solution: add something to function getOrderUser in Order.php and to function _getVatCountry in VatSelector.php | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Dear Tim Wetter, thank you for the report. I could reproduce it in 6.2.2. according to your steps. If you change in backend the order it ignores the delivery-address setting, so it discards the vat. Best Regards QA - SG - |
|
my solution in Order.php ---%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<--- /** * Returns current order user object * * @return oxuser */ public function getOrderUser() { if ($this->_oUser === null) { $this->_oUser = oxNew("oxuser"); $this->_oUser->load($this->oxorder__oxuserid->value); // if object is loaded then reusing its order info if ($this->_isLoaded) { // bill address $this->_oUser->oxuser__oxcompany = clone $this->oxorder__oxbillcompany; $this->_oUser->oxuser__oxusername = clone $this->oxorder__oxbillemail; $this->_oUser->oxuser__oxfname = clone $this->oxorder__oxbillfname; $this->_oUser->oxuser__oxlname = clone $this->oxorder__oxbilllname; $this->_oUser->oxuser__oxstreet = clone $this->oxorder__oxbillstreet; $this->_oUser->oxuser__oxstreetnr = clone $this->oxorder__oxbillstreetnr; $this->_oUser->oxuser__oxaddinfo = clone $this->oxorder__oxbilladdinfo; $this->_oUser->oxuser__oxustid = clone $this->oxorder__oxbillustid; $this->_oUser->oxuser__oxcity = clone $this->oxorder__oxbillcity; $this->_oUser->oxuser__oxcountryid = clone $this->oxorder__oxbillcountryid; $this->_oUser->oxuser__oxstateid = clone $this->oxorder__oxbillstateid; $this->_oUser->oxuser__oxzip = clone $this->oxorder__oxbillzip; $this->_oUser->oxuser__oxfon = clone $this->oxorder__oxbillfon; $this->_oUser->oxuser__oxfax = clone $this->oxorder__oxbillfax; $this->_oUser->oxuser__oxsal = clone $this->oxorder__oxbillsal; // shipping address if (!empty($this->oxorder__oxdelcountryid->value)) { $oAddress = oxNew('oxaddress'); $oAddress->setId('fakeIdFromOrder'); $oAddress->oxaddress__oxuserid = new oxField($this->_oUser->getId()); $oAddress->oxaddress__oxcompany = clone $this->oxorder__oxdelcompany; $oAddress->oxaddress__oxfname = clone $this->oxorder__oxdelfname; $oAddress->oxaddress__oxlname = clone $this->oxorder__oxdellname; $oAddress->oxaddress__oxstreet = clone $this->oxorder__oxdelstreet; $oAddress->oxaddress__oxstreetnr = clone $this->oxorder__oxdelstreetnr; $oAddress->oxaddress__oxcity = clone $this->oxorder__oxdelcity; $oAddress->oxaddress__oxcountryid = clone $this->oxorder__oxdelcountryid; $oAddress->oxaddress__oxstateid = clone $this->oxorder__oxdelstateid; $oAddress->oxaddress__oxzip = clone $this->oxorder__oxdelzip; $oAddress->oxaddress__oxfon = clone $this->oxorder__oxdelfon; $oAddress->oxaddress__oxfax = clone $this->oxorder__oxdelfax; $oAddress->oxaddress__oxsal = clone $this->oxorder__oxdelsal; $this->_oUser->addOrderDeliveryAddress($oAddress); } } } return $this->_oUser; } ---%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<--- in User.php ---%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<--- public function addOrderDeliveryAddress($oAddress, $sUserId = null) { $sUserId = isset( $sUserId ) ? $sUserId : $this->getId(); $this->getUserAddresses($sUserId); $this->_aAddresses[$sUserId][$oAddress->getId()] = $oAddress; $this->_sSelAddressId = $oAddress->getId(); } ---%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<------%<--- |