<div class="mb-2">
    <button class="btn btn-primary" onclick="export2csv()">Download csv</button>
</div>
<div class="col-md-12">
    <div class="badge badge-info float-right m-1" style="text-align: ">Total Row: <?php echo e($list->count()); ?></div>
    <div class="badge badge-info float-right m-1" style="text-align: ">Total <?php echo e($list->sum('amount')); ?></div>


</div>
<div class="table-responsive">
    <table class="table table-bordered table-condensed table-striped" id="tableId">
        <thead class="bg-blue-50">
            <tr>
                <th>
                    ID
                </th>
                <th>
                    Date
                </th>

                <th>
                    Reseller Name
                </th>
                <th>
                    Amount
                </th>

                <th>
                    After Recharge Balance
                </th>

                <?php if(checkSettings('reseller-recharge-paid-option') == 'enable'): ?>
                                            <th class="text-right">Paid Amount</th>
                                        <?php endif; ?>

                <th>
                    Current Balance
                </th>
                <th>
                    Remarks
                </th>
                <th>
                    Recharge By
                </th>

            </tr>
        </thead>
        <tbody class="bg-white divide-y divide-gray-200">
            <?php $total = 0;   ?>
            <?php $__currentLoopData = $list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                <tr>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <?php echo e($r->id); ?>

                    </td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <?php echo e(date('d-M-Y h:i:sa', strtotime($r->created_at))); ?>

                    </td>

                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                        <?php echo e($r->reseller->name ?? ''); ?>

                    </td>

                    <td class="px-6 py-4 whitespace-nowrap text-right">
                        <?php $total += $r->amount ?>
                        <?php echo e($r->amount); ?>

                    </td>


                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 text-right">
                        <?php echo e($r->after_recharge_balance); ?>

                    </td>

                    <?php if(checkSettings('reseller-recharge-paid-option') == 'enable'): ?>
                                                <td class="text-right"><?php echo e($r->paid_amount); ?></td>
                                            <?php endif; ?>
                                            
                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 text-right">

                        
                        <?php echo e($r->balance[0]['amount'] ?? ''); ?>


                    </td>
                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                        <?php echo e($r->remarks); ?>

                    </td>
                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                        <?php echo e($r->user->name ?? ''); ?>

                    </td>


                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            <tr>
                <td></td><td></td>
                <td class="text-right">Total: </td>
                <td class="px-6 py-2 whitespace-nowrap text-right"><?php echo e(number_format($total, 2, '.', '')); ?></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>

            <!-- More items... -->
        </tbody>
    </table>
</div>


<!-- More items... -->
</tbody>
</table>
</div>


<?php /**PATH /var/www/html/sajib/radius-circle/resources/views/resellerRecharge/result.blade.php ENDPATH**/ ?>