Skip to content

Commit 7de83c7

Browse files
committed
MAGETWO-96545: Wrong calculation of invoiced items in shipment document in order with bundle product after partial invoice
- Stabilize functional tets.
1 parent 4a5cc0c commit 7de83c7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ public function getData($key = null)
4545
: number_format($bundleOptions['assigned_products'][$optionKey]['data']['selection_price_value'], 2);
4646
$optionData = [
4747
'title' => $checkoutOption['title'],
48-
'value' => "{$value} {$price}",
49-
'sku' => "{$value}"
48+
'value' => "{$qty} x {$value} {$price}",
49+
'sku' => "{$qty} x {$value}",
50+
'partialInvoiceValue' => "{$value} {$price}",
51+
'partialInvoiceSku' => "{$value}"
5052
];
5153

5254
$checkoutBundleOptions[$checkoutOptionKey] = $optionData;

dev/tests/functional/tests/app/Magento/Bundle/Test/TestStep/CreatePartialInvoiceStep.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class CreatePartialInvoiceStep extends \Magento\Sales\Test\TestStep\CreateInvoic
2020
protected function getItems()
2121
{
2222
$items = parent::getItems();
23-
return $items[0]->getData()['options'];
23+
$items = $items[0]->getData()['options'];
24+
foreach ($items as &$item) {
25+
$item['value'] = $item['partialInvoiceValue'];
26+
$item['sku'] = $item['partialInvoiceSku'];
27+
}
28+
return $items;
2429
}
2530
}

0 commit comments

Comments
 (0)