-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amend store visibility of fields in Tax admin panel #10102
Conversation
Test failed, because it is expecting the scope to be 'store' and yet in adminhtml/system.xml it is clearly not set to show in store. If it is meant to show in store then I can revert the commit and and change it at
Note that there are 11 other fields which may have their scope expected to be store (not website) and are set not to show in store. |
Failure:
|
In rethinking this - Tax calculation settings need to be on a Store view scope as the test expects, because a client can use a Store view for different countries/languages so this PR needs to change to include tax calculation. http://docs.magento.com/m1/ce/user_guide/store-operations/stores-multiple.html So what needs to be changed is the adminhtml/system.xml |
This reverts commit 46691ea.
Functions in Tax Model get values from the store scope thus these fields should be visible at the store view level.
@gpcrocker Hi. Steps which I execute:
Also I tried with "Catalog price rule" and "Cart price rule" where added some conditions and discount 20%. In this case item price was decresed to 80$ and when add that item to cart tax calucation starts from 80$. The same situation with Tier price for product.
Maybe I miss some steps for reproducing bug which was described in ticket? |
@k7triton It was reported to us that on a £10 order, if a 10% discount was applied they got £1.20 off instead of £1.00. (Note that this is UK Tax 20%) We wanted to configure our store at the store level (and not the website level) so if 10% is taken off 10, then the user has a new cart total of 9. Instead the 10% discount was being calculated on the VAT separately. We amended the configuration from I dug through core code and noticed that When I find the right time at work, I will go through the same steps you described on our store and my local magento 2 instance. Thanks for taking the time to see this issue. |
HI @gpcrocker |
Original Description
In the admin panel, setting Stores -> Configuration -> Tax - > Calculation setting -> Apply Customer Tax from After Discount to Before Discount had no affect.
In \vendor\magento\module-tax\Model\Calculation\UnitBaseCalculator.php:45
$applyTaxAfterDiscount = $this->config->applyTaxAfterDiscount($this->storeId);
kept returning true inspite of setting the above correctly.Description
Fields that are being pulled at the store level from Magento Tax Config Model are not available to be set in the Configuration panel. This fix makes them visible to allow the user to for example set the Apply Customer Tax_ from After Discount to Before Discount
Manual testing scenarios
Contribution checklist