|
8 | 8 |
|
9 | 9 | /* @var \Magento\Sales\Block\Adminhtml\Order\Creditmemo\View\Form $block */
|
10 | 10 | /* @var \Magento\Tax\Helper\Data $helper */
|
| 11 | +/* @var \Magento\Framework\Escaper $escaper */ |
11 | 12 | ?>
|
12 | 13 |
|
13 | 14 | <?php $helper = $this->helper(\Magento\Tax\Helper\Data::class); ?>
|
14 |
| -<?php $_order = $block->getCreditmemo()->getOrder() ?> |
15 |
| -<?= $block->getChildHtml('creditmemo_info') ?> |
| 15 | +<?php $_creditMemo = $block->getCreditmemo(); ?> |
| 16 | +<?php $_order = $_creditMemo->getOrder() ?> |
| 17 | + |
| 18 | +<?php |
| 19 | + $creditMemoStatus = isset($_creditMemo->getStates()[$_creditMemo->getState()]) |
| 20 | + ? $_creditMemo->getStates()[$_creditMemo->getState()] |
| 21 | + : null; |
| 22 | + $memoAdminDate = $block->formatDate( |
| 23 | + $block->getCreatedAtAdminDate($_creditMemo->getCreatedAt()), |
| 24 | + \IntlDateFormatter::MEDIUM, |
| 25 | + true |
| 26 | + ); |
| 27 | +?> |
| 28 | + |
| 29 | +<div class="admin__page-section creditmemo-view-information"> |
| 30 | + <div class="admin__page-section-title"> |
| 31 | + <span class="title"><?= $escaper->escapeHtml(__('Credit Memo Information')) ?></span> |
| 32 | + </div> |
| 33 | + <div class="admin__page-section-content"> |
| 34 | + <div class="admin__page-section-item creditmemo-information"> |
| 35 | + <div class="admin__page-section-item-title"> |
| 36 | + <?php $confirmationEmailStatusMessage = $_creditMemo->getEmailSent() |
| 37 | + ? __('The credit memo confirmation email was sent') |
| 38 | + : __('The credit memo confirmation email is not sent'); |
| 39 | + ?> |
| 40 | + <span class="title"> |
| 41 | + <?= $escaper->escapeHtml(__('Memo # %1', $_creditMemo->getIncrementId())) ?> |
| 42 | + (<span><?= $escaper->escapeHtml($confirmationEmailStatusMessage) ?></span>) |
| 43 | + </span> |
| 44 | + </div> |
| 45 | + <div class="admin__page-section-item-content"> |
| 46 | + <table class="admin__table-secondary creditmemo-information-table"> |
| 47 | + <tr> |
| 48 | + <th><?= $escaper->escapeHtml(__('Credit Memo Date')) ?></th> |
| 49 | + <td><?= $escaper->escapeHtml($memoAdminDate) ?></td> |
| 50 | + </tr> |
| 51 | + <?php if ($creditMemoStatus): ?> |
| 52 | + <tr> |
| 53 | + <th><?= $escaper->escapeHtml(__('Status')) ?></th> |
| 54 | + <td><?= $escaper->escapeHtml($creditMemoStatus) ?></td> |
| 55 | + </tr> |
| 56 | + <?php endif; ?> |
| 57 | + </table> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | +</div> |
| 62 | + |
16 | 63 | <?= $block->getChildHtml('order_info') ?>
|
| 64 | + |
17 | 65 | <section class="admin__page-section">
|
18 | 66 | <div class="admin__page-section-title">
|
19 |
| - <span class="title"><?= $block->escapeHtml(__('Payment & Shipping Method')) ?></span> |
| 67 | + <span class="title"><?= $escaper->escapeHtml(__('Payment & Shipping Method')) ?></span> |
20 | 68 | </div>
|
21 | 69 | <div class="admin__page-section-content">
|
22 | 70 |
|
|
27 | 75 | <?php endif; ?>
|
28 | 76 | <?php /* Billing Address */?>
|
29 | 77 | <div class="admin__page-section-item-title">
|
30 |
| - <span class="title"><?= $block->escapeHtml(__('Payment Information')) ?></span> |
| 78 | + <span class="title"><?= $escaper->escapeHtml(__('Payment Information')) ?></span> |
31 | 79 | </div>
|
32 | 80 | <div class="admin__page-section-item-content">
|
33 | 81 | <div class="order-payment-method-title"><?= $block->getChildHtml('order_payment') ?></div>
|
34 | 82 | <div class="order-payment-currency">
|
35 |
| - <?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?> |
| 83 | + <?= $escaper->escapeHtml( |
| 84 | + __('The order was placed using %1.', $_order->getOrderCurrencyCode()) |
| 85 | + ); ?> |
36 | 86 | </div>
|
37 | 87 | <div class="order-payment-additional"><?= $block->getChildHtml('order_payment_additional') ?></div>
|
38 | 88 | </div>
|
|
42 | 92 | <div class="admin__page-section-item order-shipping-address">
|
43 | 93 | <?php /* Shipping Address */ ?>
|
44 | 94 | <div class="admin__page-section-item-title">
|
45 |
| - <span class="title"><?= $block->escapeHtml(__('Shipping Information')) ?></span> |
| 95 | + <span class="title"><?= $escaper->escapeHtml(__('Shipping Information')) ?></span> |
46 | 96 | </div>
|
47 | 97 | <div class="shipping-description-wrapper admin__page-section-item-content">
|
48 | 98 | <div class="shipping-description-title">
|
49 |
| - <?= $block->escapeHtml($_order->getShippingDescription()) ?> |
| 99 | + <?= $escaper->escapeHtml($_order->getShippingDescription()) ?> |
50 | 100 | </div>
|
51 | 101 | <div class="shipping-description-content">
|
52 |
| - <?= $block->escapeHtml(__('Total Shipping Charges')) ?>: |
| 102 | + <?= $escaper->escapeHtml(__('Total Shipping Charges')) ?>: |
53 | 103 |
|
54 | 104 | <?php if ($helper->displayShippingPriceIncludingTax()): ?>
|
55 | 105 | <?php $_excl = $block->displayShippingPriceInclTax($_order); ?>
|
|
60 | 110 |
|
61 | 111 | <?= /* @noEscape */ $_excl ?>
|
62 | 112 | <?php if ($helper->displayShippingBothPrices() && $_incl != $_excl): ?>
|
63 |
| - (<?= $block->escapeHtml(__('Incl. Tax')) ?> <?= /* @noEscape */ $_incl ?>) |
| 113 | + (<?= $escaper->escapeHtml(__('Incl. Tax')) ?> <?= /* @noEscape */ $_incl ?>) |
64 | 114 | <?php endif; ?>
|
65 | 115 | </div>
|
66 | 116 | </div>
|
|
77 | 127 | <?php else: ?>
|
78 | 128 | <section class="admin__page-section">
|
79 | 129 | <div class="admin__page-section-title">
|
80 |
| - <span class="title"><?= $block->escapeHtml(__('Items Refunded')) ?></span> |
| 130 | + <span class="title"><?= $escaper->escapeHtml(__('Items Refunded')) ?></span> |
81 | 131 | </div>
|
82 |
| - <div class="no-items admin__page-section-content"><?= $block->escapeHtml(__('No Items')) ?></div> |
| 132 | + <div class="no-items admin__page-section-content"><?= $escaper->escapeHtml(__('No Items')) ?></div> |
83 | 133 | </section>
|
84 | 134 | <?php endif; ?>
|
85 | 135 |
|
86 | 136 | <section class="admin__page-section">
|
87 | 137 | <div class="admin__page-section-title">
|
88 |
| - <span class="title"><?= $block->escapeHtml(__('Memo Total')) ?></span> |
| 138 | + <span class="title"><?= $escaper->escapeHtml(__('Memo Total')) ?></span> |
89 | 139 | </div>
|
90 | 140 | <div class="admin__page-section-content">
|
91 | 141 | <div class="admin__page-section-item order-comments-history">
|
92 | 142 | <div class="admin__page-section-item-title">
|
93 |
| - <span class="title"><?= $block->escapeHtml(__('Credit Memo History')) ?></span> |
| 143 | + <span class="title"><?= $escaper->escapeHtml(__('Credit Memo History')) ?></span> |
94 | 144 | </div>
|
95 | 145 | <div class="admin__page-section-item-content"><?= $block->getChildHtml('order_comments') ?></div>
|
96 | 146 | </div>
|
97 | 147 | <div class="admin__page-section-item order-totals" id="history_form">
|
98 | 148 | <div class="admin__page-section-item-title">
|
99 |
| - <span class="title"><?= $block->escapeHtml(__('Credit Memo Totals')) ?></span> |
| 149 | + <span class="title"><?= $escaper->escapeHtml(__('Credit Memo Totals')) ?></span> |
100 | 150 | </div>
|
101 | 151 | <div class="admin__page-section-content"><?= $block->getChildHtml('creditmemo_totals') ?></div>
|
102 | 152 | </div>
|
|
0 commit comments