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.46k stars 9.28k forks source link

Bundle Product with dynamic price - partial refund - incorrect quantity for the parent product #39060

Open gorbunovav opened 4 weeks ago

gorbunovav commented 4 weeks ago

Preconditions and environment

Steps to reproduce

  1. Create Bundle Product, set price to "dynamic", add some optional bundle items
  2. Place an order with this bundle product and some bundle items selected, set quantity to 2
  3. Invoice it
  4. Try to create a credit memo - notice that it is not possible to specify the quantity to refund for the bundle product itself. Set qty = 1 to some bundle items, and 0 all others.
  5. Save credit memo.
  6. Check in the sales_order_item table that qty_refunded for the root order item representing the bundle product is set to2 now, which doesn't make sense.

Expected result

Credit Memo allows to specify the quantity of Bundle Products to refund. If Credit Memo refunds bundle items only without the parent product - it is still displayed correctly.

Actual result

Credit Memo doesn't allow to specify the quantity of Bundle Product to refund and automatically refunds full quantity (which can break some logic and reporting). If you manage to create a Credit Memo with Bundle Product quantity set to zero it will not display refunded bundle items (the list of refunded items will be empty).

Additional information

Ideally the quantity of child items (bundle items) in the order should represent the quantity per bundle, while the the quantity of the parent product - the number of bundles (like it is implemented for the cart).

With the current approach it is hard to tell what is the relation between the quantity of each bundle item refunded and the quantity of bundles to refund.

I think it is better to allow users to specify the quantity of Bundle Products to refund according to their own business logic requirements.

Release note

No response

Triage and priority

m2-assistant[bot] commented 4 weeks ago

Hi @gorbunovav. Thank you for your report. To speed up processing of this issue, 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:

m2-assistant[bot] commented 3 weeks ago

Hi @engcom-Bravo. 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-Bravo commented 2 weeks ago

Hi @gorbunovav,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Screenshot 2024-08-27 at 13 08 46 Screenshot 2024-08-27 at 13 18 19

Credit Memo allows to specify the quantity of Bundle Products to refund and also it displays correctly the qty_refunded.

Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible.

Thanks.

gorbunovav commented 2 weeks ago

@engcom-Bravo Hi!

Sorry, but I think you have missed some points in the ticket description.

You are showing that it is possible to refund child products inside the bundle.

And this ticket is about the parent product or the root Bundle product. On your screenshot there is no field to specify the quantity for refund for the parent product. And after saving the credit memo you can check the database - the refunded quantity for the bundle product line will be equal to the invoiced quantity.

Screenshot 2024-08-29 210604
engcom-Bravo commented 2 weeks ago

Hi @gorbunovav,

Thanks for your update.

We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Screenshot 2024-08-30 at 11 27 36

In Database we have the refunded quantity for the bundle product line will be equal to the invoiced quantity.in backend there is no field specified.

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 2 weeks ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12867 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 weeks ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.