<table>
    <thead>
        <tr></tr>
    </thead>
    <tbody>
        <td></td>
    </tbody>
</table>
<table class="table table-striped mt-2" style="width:100%">
    <thead>
        <tr>
            <th display="none"></th>
            <th display="none"></th>
            <th style="text-align: center">Invoice</th>
            <th style="text-align: center">Tanggal</th>
            <th style="text-align: center">Jam</th>
            <th style="text-align: center">Item Barcode</th>
            <th style="text-align: center">Item Name</th>
            <?php if($udf): ?>
                <?php $__currentLoopData = $field; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $fld): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <th style="text-align: center">
                        Item <?php echo e(Str::after($fld, 'U_IDU_')); ?>

                    </th>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php endif; ?>
            <th style="text-align: center">Jenis</th>
            <th style="text-align: center">User</th>
            <th style="text-align: center">Staff</th>
            <th style="text-align: center">Qty</th>
            <th style="text-align: center">Sub Total</th>
            <th style="text-align: center">Discount</th>
            <th style="text-align: center">Grand Total</th>
            
        </tr>
    </thead>
    <tbody>
        <?php $__currentLoopData = $arinvoices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inv): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php $__currentLoopData = $inv->detailInvoices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $invoice): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td display="none"></td>
                    <td display="none"></td>
                    <td><?php echo e($invoice->invoice); ?></td>
                    <td><?php echo e($invoice->created_at->format('d/m/y')); ?></td>
                    <td><?php echo e($invoice->created_at->format('H:i')); ?></td>
                    <td><?php echo e($invoice->code); ?></td>
                    <td><?php echo e($invoice->name); ?></td>
                    <?php if($udf): ?>
                        <?php $__currentLoopData = $field; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $fld): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <td><?php echo e($invoice->item->$fld ?? '-'); ?></td>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    
                    <?php if($inv->payment == ''): ?>
                        <td> - </td>
                    <?php else: ?>
                        <td><?php echo e($inv->payment); ?></td>
                    <?php endif; ?>
                    <td><?php echo e($invoice->kasir->name); ?></td>
                    <td><?php echo e($invoice->sales->name); ?></td>
                    <td><?php echo e($invoice->qty); ?></td>
                    <td><?php echo e($invoice->qty * $invoice->nprice); ?></td>
                    <td><?php echo e(($invoice->nprice - $invoice->price) * $invoice->qty); ?></td>
                    <td><?php echo e($invoice->qty * $invoice->nprice - ($invoice->nprice - $invoice->price) * $invoice->qty); ?>

                    </td>
                    
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
</table>
<?php /**PATH C:\laragon\www\rybc\resources\views/export/tablearitemdetail.blade.php ENDPATH**/ ?>