Skip to content

Commit 8d10c41

Browse files
author
Yauhen_Lyskavets
committed
MAGETWO-67450: The rate in order is duplicated
- Fix CR comments
1 parent 0c41aea commit 8d10c41

File tree

1 file changed

+8
-4
lines changed
  • app/code/Magento/Sales/view/adminhtml/templates/order/view

1 file changed

+8
-4
lines changed

app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
*/
1010
$order = $block->getOrder();
1111

12+
$baseCurrencyCode = (string)$order->getBaseCurrencyCode();
13+
$globalCurrencyCode = (string)$order->getGlobalCurrencyCode();
14+
$orderCurrencyCode = (string)$order->getOrderCurrencyCode();
15+
1216
$orderAdminDate = $block->formatDate(
1317
$block->getOrderAdminDate($order->getCreatedAt()),
1418
\IntlDateFormatter::MEDIUM,
@@ -94,15 +98,15 @@ $allowedAddressHtmlTags = ['b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub
9498
<td><?= $block->escapeHtml($order->getRemoteIp()); ?><?= $order->getXForwardedFor() ? ' (' . $block->escapeHtml($order->getXForwardedFor()) . ')' : ''; ?></td>
9599
</tr>
96100
<?php endif; ?>
97-
<?php if ($order->getGlobalCurrencyCode() != $order->getBaseCurrencyCode()) : ?>
101+
<?php if ($globalCurrencyCode !== $baseCurrencyCode) : ?>
98102
<tr>
99-
<th><?= $block->escapeHtml(__('%1 / %2 rate:', $order->getGlobalCurrencyCode(), $order->getBaseCurrencyCode())) ?></th>
103+
<th><?= $block->escapeHtml(__('%1 / %2 rate:', $globalCurrencyCode, $baseCurrencyCode)) ?></th>
100104
<td><?= $block->escapeHtml($order->getBaseToGlobalRate()) ?></td>
101105
</tr>
102106
<?php endif; ?>
103-
<?php if ($order->getBaseCurrencyCode() != $order->getOrderCurrencyCode() && $order->getGlobalCurrencyCode() != $order->getOrderCurrencyCode()) : ?>
107+
<?php if ($baseCurrencyCode !== $orderCurrencyCode && $globalCurrencyCode !== $orderCurrencyCode) : ?>
104108
<tr>
105-
<th><?= $block->escapeHtml(__('%1 / %2 rate:', $order->getOrderCurrencyCode(), $order->getBaseCurrencyCode())) ?></th>
109+
<th><?= $block->escapeHtml(__('%1 / %2 rate:', $orderCurrencyCode, $baseCurrencyCode)) ?></th>
106110
<td><?= $block->escapeHtml($order->getBaseToOrderRate()) ?></td>
107111
</tr>
108112
<?php endif; ?>

0 commit comments

Comments
 (0)