<?php $__env->startSection('heading', 'Payments'); ?>
<?php $__env->startSection('subheading', 'Every payment collected across all orders.'); ?>

<?php $__env->startSection('content'); ?>

<div class="card p-5 mb-4">
  <p class="text-xs" style="color:#6b6470;">Total collected</p>
  <p class="font-display font-semibold text-2xl" style="color:#0F6E56;">₹<?php echo e(number_format($totalCollected, 0)); ?></p>
</div>

<div class="card p-6">
  <table class="w-full text-sm">
    <thead>
      <tr class="text-left" style="color:#a19a8f;">
        <th class="pb-3 font-medium text-xs">Date</th>
        <th class="pb-3 font-medium text-xs">Order</th>
        <th class="pb-3 font-medium text-xs">Customer</th>
        <th class="pb-3 font-medium text-xs">Mode</th>
        <th class="pb-3 font-medium text-xs">Collected by</th>
        <th class="pb-3 font-medium text-xs text-right">Amount</th>
      </tr>
    </thead>
    <tbody style="color:#1A1625;">
      <?php $__empty_1 = true; $__currentLoopData = $payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr class="border-t" style="border-color:#f2ece0;">
          <td class="py-3 text-xs"><?php echo e($payment->created_at->format('d M Y, h:i A')); ?></td>
          <td class="py-3">
            <a href="<?php echo e(route('orders.show', $payment->order_id)); ?>" style="color:#5E35B1; text-decoration:underline;">#<?php echo e($payment->order_id); ?></a>
          </td>
          <td class="py-3"><?php echo e($payment->order->customer->name ?? '—'); ?></td>
          <td class="py-3 text-xs uppercase"><?php echo e($payment->mode); ?></td>
          <td class="py-3 text-xs"><?php echo e($payment->collector->name ?? '—'); ?></td>
          <td class="py-3 text-right font-medium">₹<?php echo e(number_format($payment->amount, 0)); ?></td>
        </tr>
      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <tr><td colspan="6" class="py-6 text-center text-sm" style="color:#a19a8f;">No payments recorded yet.</td></tr>
      <?php endif; ?>
    </tbody>
  </table>

  <div class="mt-4"><?php echo e($payments->links()); ?></div>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH F:\xampp\htdocs\etailorz-v2\resources\views/admin/payments/index.blade.php ENDPATH**/ ?>