Skip to content

Commit

Permalink
Revert "creditmemo bundle inventory calculation error" (#2186)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano authored Jun 3, 2022
1 parent d7f0926 commit 3baa3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/core/Mage/CatalogInventory/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ public function refundOrderInventory($observer)
$parentOrderId = $item->getOrderItem()->getParentItemId();
/* @var Mage_Sales_Model_Order_Creditmemo_Item $parentItem */
$parentItem = $parentOrderId ? $creditmemo->getItemByOrderId($parentOrderId) : false;
$qty = $item->getQty();
$qty = $parentItem ? ($parentItem->getQty() * $item->getQty()) : $item->getQty();
if (isset($items[$item->getProductId()])) {
$items[$item->getProductId()]['qty'] += $qty;
} else {
Expand Down

0 comments on commit 3baa3a0

Please sign in to comment.