Projekt

Allgemein

Profil

Aktionen

GX-Task #69231

geschlossen

Refactor taxes calculation in ProductPriceConversionService::getPrice() to include multiple tax rates

Von Ahmed Hamouda vor mehr als 2 Jahren hinzugefügt. Vor mehr als 2 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Dringend
Zugewiesen an:
Moritz Bunjes
Kategorie:
Optionen
Zielversion:
% erledigt:

0%

Steps to reproduce:
Betroffene Versionen:
4.5.1.0 beta3
Release Notes Langtext:

Alle Steuersätze wurden in die Berechnung des Preises der Zusatzoptionen einbezogen


Beschreibung

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

Expected

ENABLED Gross Admin configurations

  • Product option value 01 price: 0
  • Product option value 02 price: 5
  • Product option value 03 price: 10

DISABLED Gross Admin configurations

  • Product option value 01 price: 0
  • Product option value 02 price: 3.25
  • Product option value 03 price: 6.49

Product 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 option value 02 price: 4.2 / 4.2017 / 6.05 / 7.50
  • Product option value 03 price: 8.4 / 8.4034 / 11.90 / 15.0


Zugehörige Tickets

Beziehung mit GX-Entwicklung - GX-Bug #69025: Gross Admin is active but has no effect on option surchargesErledigtMarvin Muxfeld

Aktionen
Aktionen

Auch abrufbar als: Atom PDF