Skip to content

Commit 7e3dd61

Browse files
committed
MC-16618: Eliminate @escapeNotVerified in Sales-related Modules
- Resolve admin redundant characters
1 parent ece4383 commit 7e3dd61

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,34 @@
88
<table class="qty-table">
99
<tr>
1010
<th><?= $block->escapeHtml(__('Ordered')); ?></th>
11-
<td><?= (int)$item->getQtyOrdered() * 1 ?></td>
11+
<td><?= (int) $item->getQtyOrdered() ?></td>
1212
</tr>
1313

1414
<?php if ((float)$item->getQtyInvoiced()) : ?>
1515
<tr>
1616
<th><?= $block->escapeHtml(__('Invoiced')); ?></th>
17-
<td><?= (int)$item->getQtyInvoiced() * 1 ?></td>
17+
<td><?= (int) $item->getQtyInvoiced() ?></td>
1818
</tr>
1919
<?php endif; ?>
2020

2121
<?php if ((float)$item->getQtyShipped()) : ?>
2222
<tr>
2323
<th><?= $block->escapeHtml(__('Shipped')); ?></th>
24-
<td><?= (int)$item->getQtyShipped() * 1 ?></td>
24+
<td><?= (int) $item->getQtyShipped() ?></td>
2525
</tr>
2626
<?php endif; ?>
2727

2828
<?php if ((float)$item->getQtyRefunded()) : ?>
2929
<tr>
3030
<th><?= $block->escapeHtml(__('Refunded')); ?></th>
31-
<td><?= (int)$item->getQtyRefunded() * 1 ?></td>
31+
<td><?= (int) $item->getQtyRefunded() ?></td>
3232
</tr>
3333
<?php endif; ?>
3434

3535
<?php if ((float)$item->getQtyCanceled()) : ?>
3636
<tr>
3737
<th><?= $block->escapeHtml(__('Canceled')); ?></th>
38-
<td><?= (int)$item->getQtyCanceled() * 1 ?></td>
38+
<td><?= (int) $item->getQtyCanceled() ?></td>
3939
</tr>
4040
<?php endif; ?>
4141

app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
<td class="col-qty">
116116
<input name="item[<?= (int) $_item->getId() ?>][qty]"
117117
class="input-text item-qty admin__control-text"
118-
value="<?= (int) $_item->getQty()*1 ?>"
118+
value="<?= (int) $_item->getQty() ?>"
119119
maxlength="12" />
120120
</td>
121121
<td class="col-subtotal col-price">

app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
type="checkbox"
106106
class="admin__control-checkbox"
107107
name="sidebar[<?= $block->escapeHtmlAttr($block->getSidebarStorageAction()) ?>][<?= (int) $block->getIdentifierId($_item) ?>]"
108-
value="<?= $block->canDisplayItemQty() ? (int) $_item->getQty()*1 : 1 ?>"
108+
value="<?= $block->canDisplayItemQty() ? (int) $_item->getQty() : 1 ?>"
109109
title="<?= $block->escapeHtml(__('Add To Order')) ?>"/>
110110
<label class="admin__field-label"
111111
for="sidebar-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction()) ?>-<?= (int) $block->getIdentifierId($_item) ?>">

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<span class="title"><?= $block->escapeHtml(__('Items to Refund')) ?></span>
1414
</div>
1515

16-
<?php if (!empty($_items)) : ?>
16+
<?php if (count($_items)) : ?>
1717
<div class="admin__table-wrapper">
1818
<table class="data-table admin__table-primary order-creditmemo-tables">
1919
<thead>

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items/renderer/default.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<input type="text"
3030
class="input-text admin__control-text qty-input"
3131
name="creditmemo[items][<?= (int) $_item->getOrderItemId() ?>][qty]"
32-
value="<?= (int) $_item->getQty()*1 ?>"/>
32+
value="<?= (int) $_item->getQty() ?>"/>
3333
<?php else : ?>
34-
<?= (int) $_item->getQty()*1 ?>
34+
<?= (int) $_item->getQty() ?>
3535
<?php endif; ?>
3636
</td>
3737
<td class="col-subtotal">

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<td>
2222
<input type="text"
2323
name="creditmemo[adjustment_positive]"
24-
value="<?= /* @noEscape */ $_source->getBaseAdjustmentPositive()*1 ?>"
24+
value="<?= /* @noEscape */ $_source->getBaseAdjustmentPositive() ?>"
2525
class="input-text admin__control-text not-negative-amount"
2626
id="adjustment_positive" />
2727
</td>
@@ -31,7 +31,7 @@
3131
<td>
3232
<input type="text"
3333
name="creditmemo[adjustment_negative]"
34-
value="<?= /* @noEscape */ $_source->getBaseAdjustmentNegative()*1 ?>"
34+
value="<?= /* @noEscape */ $_source->getBaseAdjustmentNegative() ?>"
3535
class="input-text admin__control-text not-negative-amount"
3636
id="adjustment_negative"/>
3737
<script>

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</section>
6363
<?php $_items = $block->getCreditmemo()->getAllItems() ?>
6464

65-
<?php if (!empty($_items)) : ?>
65+
<?php if (count($_items)) : ?>
6666
<div id="creditmemo_items_container">
6767
<?= $block->getChildHtml('creditmemo_items') ?>
6868
</div>

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items/renderer/default.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<td class="col-price">
1414
<?= $block->getColumnHtml($_item, 'price') ?>
1515
</td>
16-
<td class="col-qty"><?= (int) $_item->getQty()*1 ?></td>
16+
<td class="col-qty"><?= (int) $_item->getQty() ?></td>
1717
<td class="col-subtotal">
1818
<?= $block->getColumnHtml($_item, 'subtotal') ?>
1919
</td>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $_order = $block->getOrder() ?>
4141
<br /><?= $block->escapeHtml(__('Message:')) ?><br /> <?= $block->escapeHtml($_giftMessage->getMessage()) ?>
4242
<?php endif; ?>
4343
</td>
44-
<td align="center" valign="top" style="padding:3px 9px"><?= (int) $_item->getQtyOrdered()*1 ?></td>
44+
<td align="center" valign="top" style="padding:3px 9px"><?= (int) $_item->getQtyOrdered() ?></td>
4545
<td align="right" valign="top" style="padding:3px 9px"><?= /* @noEscape */ $_order->formatPrice($_item->getRowTotal()) ?></td>
4646
</tr>
4747
<?php endforeach; ?>

app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<?php if ($block->canEditQty()) : ?>
1717
<input type="text" class="input-text admin__control-text qty-input"
1818
name="invoice[items][<?= (int) $_item->getOrderItemId() ?>]"
19-
value="<?= (int) $_item->getQty()*1 ?>"/>
19+
value="<?= (int) $_item->getQty() ?>"/>
2020
<?php else : ?>
21-
<?= (int) $_item->getQty()*1 ?>
21+
<?= (int) $_item->getQty() ?>
2222
<?php endif; ?>
2323
</td>
2424
<td class="col-subtotal">

0 commit comments

Comments
 (0)