magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

Issuing Credit Memo (Refund) on an Order with Zero Shipping, Magento blocks this functionality. #36638

Closed arunmanglick-code closed 1 year ago

arunmanglick-code commented 1 year ago

Summary

Part 1: Recently CO Delivery Fee Implementation is taken care of across Magento connectors, where even if an Order/Invoice is with Zero/Free Shipping 0.27$ Retail Delivery Fee is charged.

Part 2: Now if a seller tries to issue a Credit Memo (Refund) on the same Zero Shipping Order/Invoice, Magento blocks this functionality. (Note: O Series still applies a $0.27 Retail Delivery Fee, even if the Order is having Free Shipping)

Rationale, at the time of Invoice Creation with zero Shipping, O Series applies a $0.27 Retail Delivery Fee, and Magento stores this 0.27 Delivery Fee in Magento DB. Because of this, when a Credit Memo is issued against the zero-shipping order, Magento blocks the Request Payload from reaching Connector. (As Magento stored 0.27 in DB, it internally treats, it as Paid Shipping Order).

To make this feature work end to end, Adobe/Magento needs to do something to override this constraint. Looking forward to your assistance to take this forward with Adobe/Magento.

Thanks

Examples

To be attached

Proposed solution

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @arunmanglick-code. 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.


: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

m2-assistant[bot] commented 1 year ago

Hi @engcom-November. 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:

engcom-November commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November, here is your Magento Instance: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering Admin access: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering/admin_44d7 Login: 47506ca3 Password: 05fa065e9c38

engcom-November commented 1 year ago

Hi @arunmanglick-code , Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance with below steps performed but the issue is not reproducible. Steps performed:

  1. Enabled Cash on delivery payment method and free shipping delivery method from admin
  2. Clear cache
  3. Front end - Placed an order with COD and free shipping
  4. Admin - Created invoice for the order - No retail delivery fees is charged
  5. Created credit memo for the order - No issue. Credit memo created successfully. image

Kindly recheck the issue on Magento 2.4-develop instance and provide missing steps if any if the issue is still reproducible. Thank you.

divij-satra commented 1 year ago

Steps to reproduce error: 1) From Backend- Assign the Tax class to free-shipping such that when customer chose Colorado as a shipping country they will charge 0.27 on free-shipping order while placing a Taxable or Non Taxable Product. PFA Configuration.JPG Configuration

2)Front end - Placed an order with COD and free shipping 3)Admin - Created invoice for the order - No retail delivery fees is charged 4) Created credit memo for the order - You will get an error.

Example for the Original issue: Part 1: Recently CO Delivery Fee Implementation is taken care of across Magento connectors, where even if an Order/Invoice is with Zero/Free Shipping 0.27$ Retail Delivery Fee is charged. PFA request_tresponse.text request_response.txt

Part 2: Now if a seller tries to issue a Credit Memo (Refund) on the same Zero Shipping Order/Invoice, Magento blocks this. PFA Error.JPG Error

The error is because there is a check in vendor/magento/ module-sales/Model/Order/Creditmemo/Total/Discount.php file

engcom-November commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November, here is your Magento Instance: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering Admin access: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering/admin_2bc8 Login: 9fdd5686 Password: c4b9b7334ed1

engcom-November commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November, here is your Magento Instance: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering Admin access: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering/admin_8449 Login: c5012c76 Password: 765bbef207f8

engcom-November commented 1 year ago

Hi @divij-satra , Thank you for the response. Verified the issue again on Magento 2.4-develop instance with below steps but still unable to reproduce the issue.

  1. Created a new tax rate and assigned new tax rule with Colorado address with new tax class assigned.
  2. Admin - Sales - Configuration - Sales - Tax - assigned new tax class for shipping
  3. Tax calculation settings set to including taxes for catalog and shipping.
  4. Created a new customer with Colorado Shipping and Billing address
  5. Placed an order from front end with COD
  6. Created invoice
  7. Created credit memo - No issue. Credit memo created successfully. Kindly recheck the issue on Magento 2.4-develop instance and provide/elaborate missing steps if any if the issue is still reproducible. Thank you.
divij-satra commented 1 year ago

HI @engcom-November Did you use the free shipping?

arunmanglick-code commented 1 year ago

@engcom-November - Did you try this using Vertex Tax Calc Engine? If yes, can you please share the payloads, as this issue is very evident (attached in snapshots too in an earlier thread)?

Do you see an option where we can connect with you over the call and explain the problem statement and make best use of your time?

Thanks

engcom-November commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November, here is your Magento Instance: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering Admin access: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering/admin_9ccf Login: 8a4ceae9 Password: 4403420799c6

engcom-November commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-November, here is your Magento Instance: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering Admin access: https://543bfc992d1dda68d9d51c67e43302c8.instances.magento-community.engineering/admin_8ada Login: 6bd75c80 Password: 79cb5c5d7a90

engcom-November commented 1 year ago

Hi @arunmanglick-code , Thank you for the response. Vertex tax configuration is no more available in latest Magento versions. Code of this package / extension is not part of https://github.com/magento/magento2/ repository. If the issue occurring due to 3rd party extensions / packages enabled, all questions, issue reports and fix for them should be addressed to the corresponding extension owners(support) on the Magento Market place page. Kindly recheck the behavior on Magento 2.4-develop instance without 3rd party packages and please share your slack id so that we can connect with you over the call if the issue is still reproducible. Thank you.

engcom-November commented 1 year ago

Hi @arunmanglick-code , We are closing this issue as there has been no latest update on the same. Kindly reopen / create new issue if you are still facing any issues. Thank you.

arunmanglick-code commented 1 year ago

Thanks Team, This issue cannot be closed with chats until you agree to be on call and see the demo. Thanks again