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

Mark invoice as last when dummy items included #1557

Merged

Conversation

mattdavenport
Copy link
Contributor

This commit fixes invoice generation when an order contains configurable or bundled items.

This is a backported fix from Magento 2, as this bug exists in M1 as well. When a configurable or dummy item is included on an order, and custom tax collectors are used the tax total is off due to $invoice->isLast() being false and the code choosing the tax total of only items+shipping (in Mage_Sales_Model_Order_Invoice_Total_Tax). This has been testing with multiple-invoiced orders as well and works as expected.

Thanks!

This commit fixes invoice generation when an order contains configurable
or bundled items.
@github-actions github-actions bot added the Component: Sales Relates to Mage_Sales label Apr 20, 2021
Copy link
Member

@colinmollenhour colinmollenhour left a comment

Choose a reason for hiding this comment

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

Very nice!

@Flyingmana
Copy link
Contributor

Flyingmana commented Apr 30, 2021

there is a comparable part in \Mage_Sales_Model_Order_Creditmemo::isLast

public function isLast()
{
foreach ($this->getAllItems() as $item) {
if (!$item->isLast()) {
return false;
}
}
return true;
}

Can we have dummy Items there, too?

@Flyingmana Flyingmana merged commit 3cf56b5 into OpenMage:1.9.4.x Apr 30, 2021
@github-actions
Copy link
Contributor

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
6 runs  +4  4 ✔️ +2  0 💤 ±0  2 ❌ +2 

Results for commit 3cf56b5. ± Comparison against base commit 6b663bb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Sales Relates to Mage_Sales
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants