 <table class="w-full border-collapse border border-gray-300 text-sm">
     <thead class="bg-gray-100 dark:bg-gray-800">
         <tr>
             <th class="border border-gray-300">#</th>
             <th class="border border-gray-300">Item Name</th>
             <th class="border border-gray-300">Quantity (gm)</th>
             <th class="border border-gray-300">Unit Price (USD)</th>
             <th class="border border-gray-300">Total Price (USD)</th>
         </tr>
     </thead>
     <tbody>
         <?php
             $totalQty = 0;
             $totalValue = 0;
         ?>

         <?php $__currentLoopData = $results; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
             <?php
                 $totalQty += $i['qty'];
                 $totalValue += $i['total_price'];
             ?>
             <tr>
                 <td class="border border-gray-300 text-center"><?php echo e($i['index']); ?></td>
                 <td class="border border-gray-300"><?php echo e($i['name']); ?></td>
                 <td class="border border-gray-300"><?php echo e($i['qty']); ?></td>
                 <td class="border border-gray-300"><?php echo e($i['unit_price']); ?></td>
                 <td class="border border-gray-300"><?php echo e(number_format($i['total_price'], 2)); ?></td>
             </tr>
         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
     </tbody>
     <tfoot class="bg-gray-100 dark:bg-gray-800">
         <tr>
             <td colspan="2" class="border border-gray-300">Totals</td>
             <td class="border border-gray-300"><?php echo e($totalQty); ?></td>
             <td class="border border-gray-300"><?php echo e(number_format($totalValue / ($totalQty==0? 1: $totalQty), 4)); ?></td>
             <td class="border border-gray-300"><?php echo e(number_format($totalValue, 4)); ?></td>
         </tr>
     </tfoot>
 </table>
<?php /**PATH D:\wamp\www\LaravelPHP\GoldPlus\resources\views\ReportElems\stock-table.blade.php ENDPATH**/ ?>