Open hostep opened 2 years ago
Hi @hostep. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Lima. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@magento give me 2.4-develop instance
@magento give me 2.4-develop instance
Hi @engcom-Lima. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Lima, here is your Magento Instance: https://0da443ed116034647d637f0a5494741e.instances.magento-community.engineering Admin access: https://0da443ed116034647d637f0a5494741e.instances.magento-community.engineering/admin_eca3 Login: 692f3262 Password: 588a7cdbda64
:heavy_check_mark: Issue confirmed
Issue got reproduced in 2.4-develop branch.
Description: Cross Border Trade kicks in even when no tax should be calculated Pre-requisite:
2.4-develop
.Steps to reproduce:
bin/magento config:set currency/options/allow EUR
bin/magento config:set currency/options/base EUR
bin/magento config:set currency/options/default EUR
bin/magento config:set general/country/default BE
bin/magento config:set general/locale/timezone Europe/Brussels
bin/magento config:set general/single_store_mode/enabled 0
bin/magento config:set shipping/origin/country_id BE
bin/magento config:set shipping/origin/postcode 9000
bin/magento config:set shipping/origin/region_id 628
bin/magento config:set tax/calculation/cross_border_trade_enabled 1
bin/magento config:set tax/calculation/discount_tax 1
bin/magento config:set tax/calculation/price_includes_tax 1
bin/magento config:set tax/calculation/shipping_includes_tax 1
bin/magento config:set tax/cart_display/full_summary 1
bin/magento config:set tax/cart_display/grandtotal 1
bin/magento config:set tax/cart_display/price 2
bin/magento config:set tax/cart_display/shipping 2
bin/magento config:set tax/cart_display/subtotal 2
bin/magento config:set tax/cart_display/zero_tax 1
bin/magento config:set tax/classes/shipping_tax_class 2
bin/magento config:set tax/defaults/country BE
bin/magento config:set tax/display/shipping 2
bin/magento config:set tax/display/type 2
bin/magento config:set tax/notification/ignore_apply_discount 0
bin/magento config:set tax/notification/ignore_discount 0
bin/magento config:set tax/notification/ignore_price_display 0
bin/magento config:set tax/sales_display/full_summary 1
bin/magento config:set tax/sales_display/grandtotal 1
bin/magento config:set tax/sales_display/price 2
bin/magento config:set tax/sales_display/shipping 2
bin/magento config:set tax/sales_display/subtotal 2
bin/magento config:set tax/sales_display/zero_tax 1
2. Setup tax rates
![image](https://user-images.githubusercontent.com/60198022/179519018-5de57a15-e203-49e0-ba5b-f900534c0976.png)
3. Setup this one tax rule - while setting it up, make sure to also create the Customer Tax Class 'Other Customer', but don't check it in this tax rule
![image](https://user-images.githubusercontent.com/60198022/179519097-5864a9ee-a914-403b-8d93-53953b2421bc.png)
4. Create a customer group 'Other Customer' and associate it with the 'Other Customer' Tax Class that you setup in the previous step.
5. In the backoffice, create these 2 customers with these addresses as default shipping & billing address:
![image](https://user-images.githubusercontent.com/60198022/179520888-5a037683-eeed-4585-bf30-6e680b4c3c44.png)
6 In the backoffice, create a category.
7.And also create a simple product to associate with the category and with these details:
![image](https://user-images.githubusercontent.com/60198022/179521176-06707091-7adb-4152-840a-816c4c85cbab.png)
8. Login and place an order from both the customers.
**Expected result:**
![image](https://user-images.githubusercontent.com/60198022/179522476-d9bcb230-6b21-4d73-8b90-8151370c049d.png)
**Actual result:**
**Without Tax-**
![image](https://user-images.githubusercontent.com/60198022/179521864-f9614099-9ae4-4f76-9ea2-6e36be8bba5f.png)
**With Tax**
![image](https://user-images.githubusercontent.com/60198022/179522416-ca9a211f-a9d1-4f30-97bf-fa8b5beb642f.png)
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-5982 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Lima. Thank you for verifying the issue.
Issue Available: @engcom-Lima, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@engcom-Lima: thank you very much for testing!
Could you also try to drag in the product owner of this part of Magento in this discussion and ask their opinion? To make sure this is a valid request?
Hi @hostep
Thanks for your detailed information provided by you.
In order to involve product owner I will confirm with my internal team members. Then, I will update you further on this.
Thanks!!
Hello @hostep,
We are putting this issue on hold to confirm the expected behavior with the PO.
Thanks
Mail has been sent to PO for his confirmation on the expected result. After his confirmation on the expected result we will proceed further.
Thanks
@engcom-Lima, @engcom-Hotel: this makes no sense, why did the issue got closed? Never even got feedback from the PO so I don't understand why this got closed for no good reason?
Update: I just noticed those PR in progress
and done
labels, so I'm going to guess this is already fixed internally? Are there already some commits you can link to? Great communication here (again) ... 😛
Hey @engcom-Lima: is there already some feedback from the PO about this? And if not, how long is it still going to take? Thanks!
Hello, is there any further update on this issue or the PR that is in progress please?
Also, thank you @hostep for writing this very detailed description of my biggest headache :)
@engcom-Lima, @engcom-Hotel: is there already feedback from the PO? You said a mail was send to him/her about 8 months ago, I'm assuming it got forgotten, maybe send a reminder (or even better: let the PO answer in public here, it will be much easier to discuss the options that way) ...
Hi @hostep,
Thanks for your patience.
As per jira PO had provided feedback as "This issue will be consider as Feature Request and Tax expert input would be needed to handle these complex scenarios" .
Thanks
Thanks @engcom-Lima, am I correct in understanding that you guys will try to involve a tax expert? Or am I considered to find a tax expert myself?
Hi @crmccann ,
Need yours intervention here.
Thanks
Hey @crmccann: is there already an update around this? We keep running into clients of ours that run against this issue...
Hi @hostep,
Thanks for your patience!
The internal team has recommended to leverage dedicated tax module e.g. Avalara, Vertex etc. to cover tax calculations. Hope this helps.
Thanks
@engcom-Lima: I completely disagree. Magento has tax calculation support build in, so why not extend it to support more cases? There is a PR with a suggestion for a solution, maybe if you disagree that this is a good idea to enable for everybody, we could only enable it with a new configuration flag?
What do you think?
We've been using this PR as a patch on a couple of the shops we maintain for a few months in production and our clients are happy with the results.
Preconditions and environment
Steps to reproduce
Install a clean Magento
After
bin/magento setup:install ...
was executed, further configure your instance like this:Setup these tax rates
Setup this one tax rule - while setting it up, make sure to also create the Customer Tax Class 'Other Customer', but don't check it in this tax rule
Create a customer group 'Other Customer' and associate it with the 'Other Customer' Tax Class that you setup in the previous step
In the backoffice, create these 2 customers with these addresses as default shipping & billing address:
Expected result
Following totals should be displayed:
Actual result
Following totals are being displayed:
Additional information
So the cross border trade option in Magento is used to show prices inclusive tax the same across all EU countries even if each EU member state has a different tax rate for a product (
well, in Magento it's implemented for ALL countries, instead of only for EU countries, but that's another bug I still need to report=> update: probably not really a bug but a config option for this would be nice). It does so by changing the prices excl tax so those are different between the EU member states.However, when a customer doesn't have to pay taxes - in the case of a B2B order from one EU member state to another member state for example (which I'm simulating here with the different customer groups that are assigned to the 2 customers) - it makes little sense for the cross border trade option to kick in when no taxes should be calculated.
Possible solution that I found so far but it's maybe not accurate:
The added check on the
$rate
to be higher than 0, means that the cross border trade option does not kick in when no taxes should be calculated.However, the end result is not correct, as it calculates the price excl tax based on the Belgium rate (21%) instead of the Luxembourg rate (17%).So the end result looks like this with this solution:Which is in my opinion still not correct.So to have a full fix, we'll somehow need to calculate 17% tax instead of 21% for prices excl tax in this case when the tax rate is 0.Update: I'm not longer convinced this is a correct assumption. The outcome with this fix might be correct because in the case when you sell to countries outside of the EU, it also subtracts 21% from the price incl tax. So maybe this is the correct outcome then for B2B sales to other EU member states after all... But I'm not an expert in international trade, so I'm not sure ...
Hope this makes sense, because it's quite complicated 🙂
Release note
When this issue gets fixed, release notes:
Fixes subtotal for orders with zero tax when cross border trade is enabled.
Triage and priority