Skip to content

AC-8286: Creditmemo on non-invoiced lines #37196 #37240

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

Open
wants to merge 20 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

adamphh
Copy link
Contributor

@adamphh adamphh commented Mar 19, 2023

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Creditmemo on non-invoiced lines #37196

Manual testing scenarios (*)

  1. Create an order with 2 products, payment by check
  2. Create an invoice on 1 product only
  3. Start creating a creditmemo
  4. Only invoiced line can be refund. The other line is hidden

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Mar 19, 2023

Hi @adamphh. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending review labels Mar 19, 2023
@adamphh
Copy link
Contributor Author

adamphh commented Mar 19, 2023

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please cover your changes with some automated test

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Delta
Copy link
Contributor

@magento run WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Delta
Copy link
Contributor

@magento run WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Delta engcom-Delta removed their assignment Apr 5, 2023
@adamphh
Copy link
Contributor Author

adamphh commented Apr 6, 2023

@magento run Unit Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@adamphh
Copy link
Contributor Author

adamphh commented Apr 7, 2023

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Delta engcom-Delta self-assigned this Apr 11, 2023
@engcom-Delta
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Delta
Copy link
Contributor

@magento run all tests

@engcom-Delta engcom-Delta removed their assignment Apr 24, 2023
@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@engcom-Delta, looks like we're not checking that items won't be returned for the case when they're not invoiced. We just check that they might be not returned. So I would explicitly check case when items are invoiced and case when some item isn't

@ihor-sviziev- I have updated the unit test file to include both scenarios. Could you please review it and provide your feedback? Thanks.

Moving it to "Pending Review".

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks good, I suggest few improvements, but feel free to keep it as is if you believe it's better not to have it

@engcom-Dash
Copy link
Contributor

In general looks good, I suggest few improvements, but feel free to keep it as is if you believe it's better not to have it

@ihor-sviziev- Thanks for the suggestions. I have updated the code accordingly.

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Bravo
Copy link
Contributor

Hi @adamphh,

Thanks for your Contribution!!.

We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots.

Manual testing scenarios

  • Create an order with 2 products, payment by check
  • Create an invoice on 1 product only
  • Start creating a creditmemo
  • Only invoiced line can be refund. The other line is hidden
Screenshot 2024-12-05 at 10 33 28 am Screenshot 2024-12-05 at 10 33 39 am

While doing CreditMemo the grid was showing only invoiced products.Could you please let us know if we are missing anything.

Thanks.

@engcom-Bravo
Copy link
Contributor

Hi @adamphh,

Can you please provide your input on #37240 (comment) till then moving this PR to On Hold.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for testing
Projects
Development

Successfully merging this pull request may close these issues.

Creditmemo on non-invoiced lines
5 participants