Skip to content

Commit 8950a8e

Browse files
author
Robert He
committed
MAGETWO-45028: Incorrect prices in backend order when base currency is not equal to display currency
-- fixed a bug with invoice and credit memo pages
1 parent e263885 commit 8950a8e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/code/Magento/Weee/Block/Item/Price/Renderer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ public function getUnitDisplayPriceExclTax()
197197
public function getBaseUnitDisplayPriceExclTax()
198198
{
199199
$orderItem = $this->getItem();
200-
if (is_a($orderItem, '\Magento\Sales\Model\Order\Invoice\Item') ||
201-
is_a($orderItem, '\Magento\Sales\Model\Order\CreditMemo\Item')) {
200+
if ($orderItem instanceof InvoiceItem || $orderItem instanceof CreditMemoItem) {
202201
$orderItem = $orderItem->getOrderItem();
203202
}
204203

@@ -346,8 +345,7 @@ public function getFinalUnitDisplayPriceExclTax()
346345
public function getBaseFinalUnitDisplayPriceExclTax()
347346
{
348347
$orderItem = $this->getItem();
349-
if (is_a($orderItem, '\Magento\Sales\Model\Order\Invoice\Item') ||
350-
is_a($orderItem, '\Magento\Sales\Model\Order\CreditMemo\Item')) {
348+
if ($orderItem instanceof InvoiceItem || $orderItem instanceof CreditMemoItem) {
351349
$orderItem = $orderItem->getOrderItem();
352350
}
353351

0 commit comments

Comments
 (0)