<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
/** @var \Magento\Sales\Block\Order\Email\Invoice\Items $block*/
?>
<?php $_invoice = $block->getInvoice() ?>
<?php $_order   = $block->getOrder() ?>
<?php if ($_invoice && $_order) : ?>
    <table class="email-items">
        <thead>
        <tr>
            <th class="item-info">

            </th><th class="item-info">
                <?= $block->escapeHtml(__('Item')) ?>
            </th>
            <th class="item-qty">
                <?= $block->escapeHtml(__('Qty')) ?>
            </th>
            <th class="item-subtotal">
                <?= $block->escapeHtml(__('Price')) ?>
            </th>
        </tr>

        </thead>
        <tbody>
        <?php echo $block->getLayout()->createBlock('Magetop\Advancepreview\Block\Order\CustomInvoiceEmail')->setData(array('order'=>$_order,'invoice'=>$_invoice))->setTemplate('Magetop_Advancepreview::order/email/items/invoice/item.phtml')->toHtml() ?>
        </tbody>
        <?php /*foreach ($_invoice->getAllItems() as $_item) : ?>
            <?php if (!$_item->getOrderItem()->getParentItem()) : ?>
                <tbody>
                    <?php echo $block->getLayout()->createBlock('Magetop\Advancepreview\Block\Order\CustomInvoiceEmail')->setData(array('order'=>$_order,'invoice'=>$_invoice))->setTemplate('Magetop_Advancepreview::order/email/items/invoice/item.phtml')->toHtml() ?>
                </tbody>
            <?php endif; ?>
        <?php endforeach; ; */ ?>
        <tfoot class="order-totals" style="display: none">
        </tfoot>
    </table>
<?php endif; ?>
