| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- /**
- * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
- */
- ?>
- <?php
- /** @var \Magento\Backend\Block\Template $block */
- /** @var \Temando\Shipping\ViewModel\Pickup\PickupItems $viewModel */
- $viewModel = $block->getData('pickupViewModel');
- ?>
- <section class="admin__page-section">
- <div class="admin__page-section-title">
- <span class="title"><?= $block->escapeHtml(__('Items Ordered')) ?></span>
- </div>
- <div class="admin__table-wrapper">
- <table class="data-table admin__table-primary order-shipment-table">
- <thead>
- <tr class="headings">
- <th class="col-product"><span><?= $block->escapeHtml(__('Description')) ?></span></th>
- <th class="col-sku"><span><?= $block->escapeHtml(__('Sku')) ?></span></th>
- <th class="col-weight"><span><?= $block->escapeHtml(__('Weight')) ?></span></th>
- <th class="col-qty-ordered"><span><?= $block->escapeHtml(__('Qty Ordered')) ?></span></th>
- <th class="col-qty-fulfilled"><span><?= $block->escapeHtml(__('Qty Fulfilled')) ?></span></th>
- <th class="col-qty-prepared"><span><?= $block->escapeHtml(__('Qty Prepared')) ?></span></th>
- <th class="col-qty last"><span><?= $block->escapeHtml(__('Qty Packed')) ?></span></th>
- </tr>
- </thead>
- <?php /** @var \Magento\Sales\Model\Order\Item[] $items */ ?>
- <?php $items = $viewModel->getAllOrderItems(); ?>
- <?php foreach ($items as $index => $item) : ?>
- <tbody class="<?= $block->escapeHtml(($index % 2) ? 'even' : 'odd') ?>">
- <tr>
- <td class="col-product"><div><?= $block->escapeHtml($item->getName()) ?></div></td>
- <td class="col-sku"><div><?= $block->escapeHtml($item->getSku()) ?></div></td>
- <td class="col-weight"><div><?= $block->escapeHtml($item->getWeight()) ?></div></td>
- <td class="col-qty-ordered">
- <div><?= $block->escapeHtml((int) $item->getQtyOrdered()) ?></div>
- </td>
- <td class="col-qty-fulfilled">
- <div><?= $block->escapeHtml((int) $item->getQtyShipped()) ?></div>
- </td>
- <td class="col-qty-prepared">
- <div><?= $block->escapeHtml($viewModel->getQtyPrepared($item->getSku())) ?></div>
- </td>
- <td class="col-qty">
- <div>
- <?php
- $qtyToPack = $item->getQtyToShip() - $viewModel->getQtyPrepared($item->getSku());
- $validationClass = sprintf('digits-range-0-%d', $qtyToPack);
- ?>
- <input type="text"
- id="<?= $block->escapeHtml('pickup-qty-packed-' . $item->getItemId())?>"
- name="pickup[items][<?= $block->escapeHtml($item->getItemId()) ?>]"
- <?php // @codingStandardsIgnoreLine ?>
- class="input-text admin__control-text qty-item required-entry validate-digits-range <?= /* @noEscape */ $validationClass ?>"
- value="<?= $block->escapeHtml($qtyToPack) ?>"
- />
- </div>
- </td>
- </tr>
- </tbody>
- <?php endforeach; ?>
- </table>
- </div>
- </section>
- <section class="admin__page-section-item-content order-totals-actions">
- <div class="actions">
- <?= /** @noEscape */ $block->getChildHtml('submit_button') ?>
- </div>
- </section>
|