<?php $__env->startSection('title','Journal Entries'); ?>
<?php $__env->startSection('content'); ?>
<div class="page-head"><div><h1>Journal entries</h1><p>Balanced double-entry postings from every operational module.</p></div><a href="<?php echo e(route('accounts.journals.create')); ?>" class="btn btn-primary btn-dense"><i class="bi bi-plus-lg me-1"></i>Manual journal</a></div><div class="card-erp"><div class="card-erp-body"><form class="d-flex gap-2"><input class="form-control" name="q" value="<?php echo e(request('q')); ?>" placeholder="Journal or reference number"><button class="btn btn-dark">Search</button></form></div><div class="table-responsive"><table class="table table-dense"><thead><tr><th>Journal</th><th>Date</th><th>Reference</th><th>Description</th><th class="text-end">Debit</th><th class="text-end">Credit</th><th>Status</th><th>Posted by</th></tr></thead><tbody><?php $__empty_1 = true; $__currentLoopData = $journals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $j): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><tr><td class="fw-bold text-accent"><?php echo e($j->journal_no); ?></td><td><?php echo e($j->entry_date->format('d M Y')); ?></td><td><?php echo e($j->reference_number?:ucfirst($j->reference_type)); ?></td><td><?php echo e($j->description); ?></td><td class="text-end"><?php echo e(number_format((float)$j->total_debit,2)); ?></td><td class="text-end"><?php echo e(number_format((float)$j->total_credit,2)); ?></td><td><span class="badge status-<?php echo e($j->status); ?>"><?php echo e(strtoupper($j->status)); ?></span></td><td><?php echo e($j->createdBy?->name); ?></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><tr><td colspan="8" class="text-center text-muted py-5">No journals posted.</td></tr><?php endif; ?></tbody></table></div><?php if($journals->hasPages()): ?><div class="card-erp-body border-top"><?php echo e($journals->links()); ?></div><?php endif; ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\saudi\resources\views/accounts/journals.blade.php ENDPATH**/ ?>