Projekt

Allgemein

Profil

GX-Task #69231

Von Ahmed Hamouda vor mehr als 2 Jahren aktualisiert

_Refactor the following:_ 
 * **`src/GambioAdmin/Modules/Price/App/Data/ProductPriceConversionReader.php::getTaxClassRatesTotal()`**    *to get all tax rates* 
 * **`src/GambioAdmin/Modules/Price/App/ProductPriceConversionService.php::getProductTaxes()`** *to calculate all the taxes according to its type (percent/fixed) and priority* 

 _Expected:_ 
 ALL tax rates should be included in the gross/net price calculations. 
 * Tax rates with the same priority should be added 
 * Tax rates with different priorities should be compounded 

 _Actual:_ 
 If multiple tax rates are returned it will use the highest to calculate the final price.  

 _____________________________ 

 _Steps to test:_ 

 1. Navigate/Search for Settings > System > Gambio Admin > Gross Admin 
 1. Make sure that Gross Admin switch is enabled 
 1. Navigate/Search for Settings > Language, Countries, Taxes > Tax Rates (Open) 
 1. Create new tax rate with the following information 
     - Tax class title: Standardsatz 
     - Zone: Deutschland 
     - Tax rate (%): 21 
     - Description: 21% MwSt. 
     - Priority: 1 
 1. Create new tax rate with the following information 
     - Tax class title: Standardsatz 
     - Zone: Deutschland 
     - Tax rate (%): 10 
     - Description: 10% MwSt. 
     - Priority: 2 
 1. Navigate to Catalog > Options 
 1. Create new option 
 1. Create new option value (01) with price 0 
 1. Create new option value (02) with price 5 
 1. Navigate to Catalog > Categories / Products 
 1. Create new product with the following information 
     - Product Price: 15.4 
     - Tax Class: Standardsatz 
 1. Navigate to the Options tab in the product edit page 
 1. Click on Attach product option(s) 
 1. Choose the option with both values created earlier in steps: 7, 8, 9 then save 
 1. Create new option value (03) with price 10 (still from inside product options tab for the same option) 
 1. Check expected results for gross admin option enabled 
 1. Disable the admin configuration "Gross Admin" (enabled in step.1 ) 
 1. Check expected results for gross admin option disabled 



 _**Expected**_ 

 _ENABLED Gross Admin configurations_ 
 - Product Produce option value 01 price: 0 
 - Product Produce option value 02 price: 5 
 - Product Produce option value 03 price: 10 

 _DISABLED Gross Admin configurations_ 
 - Product Produce option value 01 price: 0 
 - Product Produce option value 02 price: 3.25 
 - Product Produce option value 03 price: 6.49 


 _Product _Produce prices in frontend:_ 
 - Starting from (first load): 15.40 
 - Selected option value 01: 15.40 
 - Selected option value 02: 20.40 (+ 5.0) 
 - Selected option value 03: 25.40 (+ 10.0) 



 _**Really WRONG results**_ 

 _ENABLED Gross Admin configurations_ 

 - Product Produce option value 02 price: 4.2 / 4.2017 / 6.05 / 7.50 
 - Product Produce option value 03 price: 8.4 / 8.4034 / 11.90 / 15.0 


Zurück