From 5d92ea0bab7443644b4b1e834d3f75a4b755fbbb Mon Sep 17 00:00:00 2001 From: Franck Allimant Date: Wed, 22 Jan 2014 01:18:28 +0100 Subject: [PATCH] TaxManager is now a service in the container. --- core/lib/Thelia/Config/Resources/config.xml | 8 ++ .../Thelia/Config/Resources/smarty-plugin.xml | 1 + .../Thelia/Controller/Admin/TaxController.php | 24 ++-- core/lib/Thelia/Core/Template/Loop/Cart.php | 2 +- .../Thelia/Core/Template/Loop/Delivery.php | 2 +- .../lib/Thelia/Core/Template/Loop/Product.php | 4 +- .../Template/Loop/ProductSaleElements.php | 2 +- core/lib/Thelia/Core/Template/Loop/Tax.php | 1 + .../Smarty/Plugins/DataAccessFunctions.php | 19 ++- core/lib/Thelia/Form/TaxCreationForm.php | 41 +++--- core/lib/Thelia/Model/Tax.php | 15 ++- .../TaxEngine/{TaxType => }/BaseTaxType.php | 95 ++++++++++---- core/lib/Thelia/TaxEngine/TaxEngine.php | 122 ++++++++++-------- .../TaxType/FeatureFixAmountTaxType.php | 21 ++- .../TaxEngine/TaxType/FixAmountTaxType.php | 16 ++- .../TaxEngine/TaxType/PricePercentTaxType.php | 20 +-- .../TaxTypeRequirementDefinition.php | 69 ++++++++++ .../Core/Template/Element/BaseLoopTestor.php | 2 + .../Thelia/Tests/TaxEngine/CalculatorTest.php | 16 +-- .../Thelia/Tests/TaxEngine/TaxEngineTest.php | 61 +++++++++ install/insert.sql | 4 +- .../default/includes/module-block.html | 13 +- templates/backOffice/default/tax-edit.html | 8 +- 23 files changed, 414 insertions(+), 152 deletions(-) rename core/lib/Thelia/TaxEngine/{TaxType => }/BaseTaxType.php (54%) create mode 100644 core/lib/Thelia/TaxEngine/TaxTypeRequirementDefinition.php create mode 100644 core/lib/Thelia/Tests/TaxEngine/TaxEngineTest.php diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml index a5f79b8bf..9657f80e0 100755 --- a/core/lib/Thelia/Config/Resources/config.xml +++ b/core/lib/Thelia/Config/Resources/config.xml @@ -12,6 +12,7 @@ + @@ -35,6 +36,13 @@ + + + + + + +