Closed chequille closed 2 years ago
Hi @chequille. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
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, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @ajijshekh123. 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
Hi @ajijshekh123. Thank you for your request. I'm working on Magento instance for you.
Hi @ajijshekh123, here is your Magento Instance: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-develop.instances.magento-community.engineering Admin access: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-develop.instances.magento-community.engineering/admin_b98f Login: c4a7c4bc Password: 96627e5bc50d
Hi @chequille, I have verified this issue on the latest Magento version. Once I have place an order and generate the Invoice and Shipment the order status is showing "Complete" instead of "Close". After generating the Invoice and Shipment, Admin can generate the Credit memo.
The issue is not getting and it's working as expected.
See attached the screenshot:
Thanks
@ajijshekh123 Sorry, my steps to reproduce were not correct:
Of course, the cart total value must be less than the fixed discount amount to get "No Payment required"
If you try it like this, after creating the invoice status is going to closed and no credit memo is possible.
Try it Best regards, Chequille
@magento give me 2.4-develop instance
Hi @chequille. Thank you for your request. I'm working on Magento instance for you.
Hi @chequille, here is your Magento Instance: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-develop.instances.magento-community.engineering Admin access: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-develop.instances.magento-community.engineering/admin_d073 Login: 07d41432 Password: 197db42565be
@magento give me 2.4-develop instance
Hi @ajijshekh123. Thank you for your request. I'm working on Magento instance for you.
Hi @ajijshekh123, here is your Magento Instance: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-develop.instances.magento-community.engineering Admin access: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-develop.instances.magento-community.engineering/admin_ad78 Login: 90fc3efc Password: e223441b4980
@ajijshekh123 morning I tried to reproduce it, but the settings of the standard instance differ at so many points compared with my shop which is set to use in Germany. As well, there are some modules installed taking care of German and EU law, which are not installed here in the instance. Maybe the only way for my shop would be to know, where Magento decides to disable the credit memo button and setting status to closed. If I would know this, I may develop a plugin for it to handle it as I need it. But I have no idea where this is done. Maybe you can help me. Best regards, Jürgen
Hi @chequille,
Thanks for the information. But as a Magneto Maintainer, I can verify the issue on default Magento Instance and if an issue is present I can verify it else I can close it OR assign it to another maintainer. As per your above comment, You are installing other plugins so it will definitely affect to default Magento functionality. I have advised you can you please verify this issue on the default Magento instance and if it is found let me know so I will verify it and create the ticket on the Magento Jira board else you can be fixed your way.
Thanks.
Hi @ajijshekh123, please try it with my information above and using tax for all products and all countries and zip zones. I believe, that it is not related to my third party modules as they only add some new tax classes and some frontend views. Regards, Chequille
Okay @chequille, I will verify this issue ASAP and Update it here.
@magento give me 2.4.3 instance
Hi @chequille. Thank you for your request. I'm working on Magento instance for you.
Hi @chequille, here is your Magento Instance: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-3.instances.magento-community.engineering Admin access: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-3.instances.magento-community.engineering/admin_7409 Login: c6200a23 Password: 3dc31376001a
Hi @ajijshekh123,
I believe I found the problem. It is alittle bit tricky to setup a new shop to reproduce it, as my shop is a german shop with some special things. But I can describe when it happens and when it is working.
Some explanations: we do have two different tax rates in germany, 19% and 7%. THese rates are valid all over germany and they do not depend on regions or states as it is in the US. There are products with 7% tax and there are products with 19% tax. Below a screenshot from my tax rules
What I found is, if an order does contain only products with 7% tax (the frist entry in the rules list), I can create a creditmemo if doing it like above with discount and free shipping. If the order contains a product with 19% tax, creditmemo is not possible anymore because after invoicing the order state is going to closed.
Because of this, you could not reproduce it because the demo shop of an instance is set to US and all products are non tabable.
Therefore, I would like to know the part of the code which is setting the order state after invoicing. It seems for me, that there will be the error.
Do you know where it is done and could you let me know so I can have a look into it? Regards, Chequille
Additional info: in model Magento\Sales\Model\ResourceModel\Order\Handler\State the state of the order is checked and set. WIthin this check, there is a function canCreditmemo() which is called and in case of this function returning false status is set to Closed This canCreditmemo function is defined in Magento\Sales\Model\Order Why it is returning false in case of an order having a product with the 19% tax I have no idea. It is returning true if the order contains only products with 7% tax. So far my insvestigations. I hope somebody does have an idea why this happens and how to fix it.
Regards Chequille
@magento give me 2.4.3 instance
Hi @ajijshekh123. Thank you for your request. I'm working on Magento instance for you.
Hi @ajijshekh123, here is your Magento Instance: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-3.instances.magento-community.engineering Admin access: https://64adcc76e524ad5a6a84ea3f074ec277-2-4-3.instances.magento-community.engineering/admin_3421 Login: 30815ac2 Password: eac8898dd068
@ajijshekh123 Sorry, my steps to reproduce were not correct:
- My products are with tax, do not see tax in your example
- The coupon rule is a fixed value, f.e. 100$ not the 100% as I mentioned before, means under Action choose "Fixed amount discount for whole cart"
- In Configuration Sales -> Tax: Apply Customer Tax must be set to "After Discount"
- In Configuration Sales -> Tax: Apply Discount On Prices must be set to "Including Tax"
Of course, the cart total value must be less than the fixed discount amount to get "No Payment required"
If you try it like this, after creating the invoice status is going to closed and no credit memo is possible.
Try it Best regards, Chequille
Hi @chequille,
I tried with the above your steps but still, the issue is not reproduced. After placing an order with the "No Payment required" payment method. I can able to generate the Invoice and Credit memo.
See attached the screenshot:
Order Placed
Invoice:
Credit Memo
After Generate the Credit memo, The Order status would be 'Closed"
Thanks.
Hi @ajijshekh123,
sorry, but I still see no tax in your order and as well you did not read my last comments. Of course you can not reproduce it because all products are without tax. As I found, my reported issue only happens if there are more than one tax classes configured. Please read my comments: https://github.com/magento/magento2/issues/34294#issuecomment-945125218 https://github.com/magento/magento2/issues/34294#issuecomment-945197635
If you don't do it as my shop is configured using products with 7% tax and products with 19% tax, it will not be reproducable.
Best regards, Chequille
Okay @chequille, Sorry for that. Let me unassign this task and the Magento QA team can itself verify the issue and update the status and comment.
We also have a german magento 2.4.3 shop and i can confirm the same issue
@simonmaass Thank you very much for this. Maybe this helps, we are now two having this issue.
@magento give me 2.4-develop instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel. 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.
Hi @engcom-Hotel, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.
Hello @chequille @simonmaass,
We have tried to reproduce the issue in Magento 2.4-develop branch but for us, it is not reproducible. Please have a look at our configuration below:
Tax Rule:
Discount Rule:
Product:
Tax Configuration in Stores->Configuration ->Sales->Tax: a. Calculation Settings:
b. Default Tax Destination Calculation:
Please let us know if we have missed anything. I request you to please run this scenario in Magento 2.4-develop.
Thanks
@engcom-Hotel could you please show a screenshot from the order?
you have to admit, that a refund of the grand total of 19€ makes absolutely no sense if the order total was 0€
@engcom-Hotel Question: The product you choosed for the order, which tax does it have? If it has the VAT-Standard, then please try to make the same with a the product having the VAT-Reduced Tax
As I said in my comments before, it only happens with one of the two defined tax classes.
In my shop I can do the credit memo when the product does have the 7% Tax, but not when I am using the second defined tax class 19%
If you do not try this, you cannot reproduce the bug I and Simonmaass are reporting.
Best regards, CHequille
Just saw, that your product was set to use VAT-Standard. Therefore, you have to try it with a product having the VAT-Reduced. You (hopefully) will see, that this order cannot be credited.
As well your refund is not correct as Simonmaas said before.
Hi Everybody, as I made as well a few new tests regarding this issue, I found a new situation and it is strange.
Whether the order is going to closed or completed depends on the price value of the product.
I made an order with a product having a price (incl. 19% tax) of 17,40€ and this order is going to closed after I made the invoice. I made another order with a product having a price (incl. 19% tax) of 9,90€ and this order is going to completed after I made the invoice, which is the correct behaviour.
So, I think that there is somewhere a rounding problem of float vlaues which causes this problem. Unfortunately, I did not find yet the point in the code where the status of the order is set, but I guess within this procedure the fault can be found.
Do you know where status is set after invoice is made?
Best regards, Chequile
@chequille
Below I have tried with the product price with 17,40€, please have a look at checkout page:
I can create the credit memo for this as well. As you mentioned in the main description, we need to enable free shipping, do we need to follow this here as well.
Thanks
Yes, you must add free shipping and as well a coupon code. Order Total must be 0.00€
Hello @chequille,
We have tried to reproduce the issue again but we are unable to get the order total as 0. Maybe we have different tax calculations, below are the screenshots for the same:
Checkout Page
Tax Calculation Settings
Do we need to make any changes to it? Please let us know.
Thanks
Hi @engcom-Hotel,
sorry, but this is now a completly different bug. Where is the 3,31€ coming from? Sorry, product is €17,40, discount is €17,40 With my calculator 17,40 -17,40 is ZERO
We do not have to go one if the order is wrong as it is above in your example. But, to answer your question: the settings are the same in my setup.
BR Chequille
Hello @chequille,
In that case, can we edit the main description with the bug I have encountered? Because we are not able to reproduce the issue you have mentioned.
Or please tell us if missed anything in order to reproduce the issue.
Thanks
Hello @engcom-Hotel, I do not understand what you are talking about. I said in my last comment, that the order you made is completly wrong. There is already the bug that your order does have a total of 3.35€, because it should have a total of 0€ Therefore it is clear, that you cannot reproduce my issue. In my point of view you have first to find why your order is NOT ZERO !!!!
Best regards, Jürgen
@magento give me 2.4-develop instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Hotel, here is your Magento Instance: https://4cbacf09b833ea61deb174bd6edf54e4.instances.magento-community.engineering Admin access: https://4cbacf09b833ea61deb174bd6edf54e4.instances.magento-community.engineering/admin_4f14 Login: 48b882d3 Password: 14ca8fe4fb8a
@magento give me 2.4-develop instance
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.