<?php $__env->startSection('title', __('Expenses')); ?>
<?php $__env->startSection('content'); ?><div class="row g-3"><div class="col-lg-4"><div class="card"><div class="card-body p-4"><h6><?php echo e(__('Record Expense')); ?></h6><form method="POST" action="<?php echo e(route('expenses.store')); ?>"><?php echo csrf_field(); ?><label class="form-label mt-2"><?php echo e(__('Category')); ?></label><input name="category" class="form-control" placeholder="Transport, rent, salary..." required><label class="form-label mt-3"><?php echo e(__('Amount')); ?></label><input name="amount" type="number" min="0.01" step="0.01" class="form-control" required><label class="form-label mt-3"><?php echo e(__('Currency')); ?></label><select name="currency_code" class="form-select"><?php $__currentLoopData = $currencies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $currency): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($currency->code); ?>" <?php if($currency->is_default): echo 'selected'; endif; ?>><?php echo e($currency->code); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select><label class="form-label mt-3"><?php echo e(__('Date')); ?></label><input name="expense_date" type="date" class="form-control" value="<?php echo e(now()->toDateString()); ?>"><select name="method" class="form-select mt-3"><option value="cash"><?php echo e(__('Cash')); ?></option><option value="bank"><?php echo e(__('Bank')); ?></option><option value="mobile"><?php echo e(__('Mobile Money')); ?></option></select><textarea name="notes" class="form-control mt-3" rows="2" placeholder="<?php echo e(__('Notes')); ?>"></textarea><button class="btn btn-success w-100 mt-3"><?php echo e(__('Save Expense')); ?></button></form></div></div></div><div class="col-lg-8"><div class="card"><div class="card-body"><table class="table align-middle"><thead><tr><th><?php echo e(__('Date')); ?></th><th><?php echo e(__('Category')); ?></th><th><?php echo e(__('Amount')); ?></th><th><?php echo e(__('Method')); ?></th><th></th></tr></thead><tbody><?php $__empty_1 = true; $__currentLoopData = $expenses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expense): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><tr><td><?php echo e($expense->expense_date->format('d M Y')); ?></td><td><?php echo e($expense->category); ?><small class="d-block text-muted"><?php echo e($expense->notes); ?></small></td><td><?php echo e(number_format($expense->amount,2)); ?> <?php echo e($expense->currency_code); ?></td><td><?php echo e(ucfirst($expense->method)); ?></td><td><form method="POST" action="<?php echo e(route('expenses.destroy',$expense)); ?>"><?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?><button class="btn btn-light btn-sm text-danger"><i class="fa-solid fa-trash"></i></button></form></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><tr><td colspan="5" class="text-center text-muted py-5"><?php echo e(__('No expenses yet.')); ?></td></tr><?php endif; ?></tbody></table><?php echo e($expenses->links('pagination::bootstrap-5')); ?></div></div></div></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\TradeERP\resources\views/expenses/index.blade.php ENDPATH**/ ?>