Skip to content
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

Prevented /Magento/Sales/Model/Service/InvoiceService.php incorrectly… #22263

Merged
merged 1 commit into from
Apr 23, 2019
Merged

Prevented /Magento/Sales/Model/Service/InvoiceService.php incorrectly… #22263

merged 1 commit into from
Apr 23, 2019

Conversation

ryanpalmerweb
Copy link
Contributor

@ryanpalmerweb ryanpalmerweb commented Apr 10, 2019

Description (*)

When calling Magento\Sales\Model\Service\InvoiceService::prepareInvoice without a quantity specified, the function no longer (incorrectly) discards items when bundled items have been processed

Fixed Issues (if relevant)

  1. Programatically created invoices miss items when both simple products and bundled products are mixed in an order #22246: Programatically created invoices miss items when both simple products and bundled products are mixed in an order

Manual testing scenarios (*)

  1. Create an order containing both a bundled product and a simple product
  2. Check out with a payment method which does not automatically create an invoice
  3. Programatically get an instance of the order, and then run the following code
$invoice = $order->prepareInvoice();
$invoice->getOrder()->setIsInProcess(true);
$invoice->register()->pay();
$invoice->save();
  1. Simple products without a parent will no longer be missed from the invoice

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)
  • All automated tests passed successfully (all builds on Travis CI are green)

@m2-assistant
Copy link

m2-assistant bot commented Apr 10, 2019

Hi @ryanpalmerweb. Thank you for your contribution
Here is some useful tips 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Apr 10, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

After changes are applied and all builds are green, please squash them into a single commit so that we have perfectly clean history 😉

app/code/Magento/Sales/Model/Service/InvoiceService.php Outdated Show resolved Hide resolved
@ghost ghost assigned orlangur Apr 10, 2019
… discarding simple items when bundle items are mixed in a call to prepareInvoice without any qtys specified

Renamed emptyQtys to isQtysEmpty
@ryanpalmerweb
Copy link
Contributor Author

@orlangur Was that addressed to me? I made the change requested but the commits were not squashed.

@orlangur
Copy link
Contributor

@ryanpalmerweb yep, please squash.

@ryanpalmerweb
Copy link
Contributor Author

@ryanpalmerweb yep, please squash.

should be squashed now?

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-4739 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@ryanpalmerweb thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@m2-assistant
Copy link

m2-assistant bot commented Apr 23, 2019

Hi @ryanpalmerweb, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

taskula pushed a commit to Hypernova-Oy/magento2 that referenced this pull request Apr 23, 2019
@magento-engcom-team magento-engcom-team added this to the Release: 2.3.2 milestone Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants