<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Trial Balance — <?php echo e($trialBalance['as_of']); ?></title>
    <style>
        body { font-family: DejaVu Sans, sans-serif; font-size: 11px; color: #111; }
        h1 { font-size: 16px; margin-bottom: 4px; }
        p { margin: 0 0 12px; color: #555; }
        table { width: 100%; border-collapse: collapse; }
        th, td { border: 1px solid #ddd; padding: 6px 8px; text-align: left; }
        th { background: #f3f4f6; }
        .text-right { text-align: right; }
        tfoot td { font-weight: bold; background: #f8fafc; }
    </style>
</head>
<body>
    <h1>Trial Balance</h1>
    <p>As of <?php echo e(\Illuminate\Support\Carbon::parse($trialBalance['as_of'])->format('d M Y')); ?> — <?php echo e($trialBalance['is_balanced'] ? 'Balanced' : 'Not Balanced'); ?></p>

    <table>
        <thead>
            <tr>
                <th>Code</th>
                <th>Account</th>
                <th>Category</th>
                <th class="text-right">Debit</th>
                <th class="text-right">Credit</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $trialBalance['rows']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($row['code']); ?></td>
                    <td><?php echo e($row['name']); ?></td>
                    <td><?php echo e(is_object($row['category']) ? $row['category']->label() : ucfirst($row['category'])); ?></td>
                    <td class="text-right"><?php echo e($row['debit'] !== '0.00' ? number_format($row['debit'], 2) : '—'); ?></td>
                    <td class="text-right"><?php echo e($row['credit'] !== '0.00' ? number_format($row['credit'], 2) : '—'); ?></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="3">Totals</td>
                <td class="text-right"><?php echo e(number_format($trialBalance['total_debits'], 2)); ?></td>
                <td class="text-right"><?php echo e(number_format($trialBalance['total_credits'], 2)); ?></td>
            </tr>
        </tfoot>
    </table>
</body>
</html>
<?php /**PATH C:\laragon\www\southend\resources\views\exports\trial-balance.blade.php ENDPATH**/ ?>