| Current Path : /var/www/html/LLCF-APP/storage/framework/views/ |
| Current File : /var/www/html/LLCF-APP/storage/framework/views/23b33f20648789bbd9fd0a77b2ea991b.php |
<?php $__env->startSection('css'); ?>
<style>
.table td {
white-space: unset;
}
.swal2-confirm.red-button {
background-color: red !important;
border-color: red !important;
color: white !important;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- Page Header -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">Petty Cash Book</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item">
<a href="<?php echo e(route('admin.dashboard')); ?>">Dashboard</a>
</li>
<li class="breadcrumb-item active">Petty Cash Book</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Content -->
<div class="content">
<div class="container-fluid">
<?php echo $__env->make('include.messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<!-- Filter Form -->
<div class="card mb-3">
<div class="card-body pt-3 pb-1">
<form method="GET" action="<?php echo e(route('admin.petty-cash-book.index')); ?>">
<div class="form-row align-items-end">
<div class="col-md-3 mb-2">
<input
type="text"
name="particulars"
value="<?php echo e(request('particulars')); ?>"
class="form-control"
placeholder="Search by particulars"
>
</div>
<div class="col-md-2 mb-2">
<input
type="number"
name="voucher_no"
value="<?php echo e(request('voucher_no')); ?>"
class="form-control"
placeholder="Voucher No"
>
</div>
<div class="col-md-3 mb-2">
<label class="mb-1">From Date</label>
<input
type="date"
name="date_from"
value="<?php echo e(request('date_from')); ?>"
class="form-control"
>
</div>
<div class="col-md-3 mb-2">
<label class="mb-1">To Date</label>
<input
type="date"
name="date_to"
value="<?php echo e(request('date_to')); ?>"
class="form-control"
>
</div>
<div class="col-md-1 mb-2 d-flex gap-2">
<button type="submit" class="btn btn-primary mr-2">
<i class="fas fa-search"></i> Filter
</button>
<a href="<?php echo e(route('admin.petty-cash-book.index')); ?>" class="btn btn-secondary">
<i class="fas fa-times-circle"></i> Reset
</a>
</div>
</div>
</form>
</div>
</div>
<!-- Table -->
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between align-items-center">
<h3 class="card-title mb-0">Petty Cash Entries</h3>
<a class="btn btn-primary" href="<?php echo e(route('admin.petty-cash-book.create')); ?>">
<i class="fas fa-plus"></i>
</a>
</div>
</div>
<div class="card-body p-0">
<!-- Export Buttons -->
<div class="mb-3 d-flex justify-content-start p-2">
<a href="<?php echo e(route('admin.petty-cash-book.export.excel', request()->query())); ?>" class="btn btn-success mr-2">
<i class="fas fa-file-excel"></i> Export Excel
</a>
<a
href="<?php echo e(route('admin.petty-cash-book.export.pdf', request()->query())); ?>"
class="btn btn-danger mr-2"
>
<i class="fas fa-file-pdf"></i> Export PDF
</a>
<a
href="<?php echo e(route('admin.petty-cash-book.export.csv', request()->query())); ?>"
class="btn btn-success"
>
<i class="fas fa-file-csv"></i> Export CSV
</a>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Particulars</th>
<th>Voucher No</th>
<th>Amount Received</th>
<th>Amount Paid</th>
<th>Voucher Expense</th>
<th>Date</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $pettyCashBooks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td><?php echo e($entry->particulars); ?></td>
<td><?php echo e($entry->voucher_no ?? '-'); ?></td>
<td><?php echo e(number_format($entry->amount_recieved, 2)); ?></td>
<td><?php echo e(number_format($entry->amount_paid, 2)); ?></td>
<td><?php echo e($entry->voucherExpense?->title ?? '-'); ?></td>
<td><?php echo e($entry->date?->format('d M Y')); ?></td>
<td class="text-center">
<div class="btn-group">
<a
href="<?php echo e(route('admin.petty-cash-book.edit', $entry->id)); ?>"
class="btn btn-default btn-sm"
>
<i class="fas fa-edit"></i>
</a>
<form
class="delete-entry-form"
action="<?php echo e(route('admin.petty-cash-book.destroy', $entry->id)); ?>"
method="POST"
>
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-default btn-sm">
<i class="fas fa-trash"></i>
</button>
</form>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="7" class="text-center">
No petty cash entries found.
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<?php if($pettyCashBooks->total() > 10): ?>
<div class="card-footer">
<div class="d-flex justify-content-end">
<?php echo e($pettyCashBooks->appends(request()->query())->links('vendor.pagination.bootstrap-4')); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<script>
$(document).ready(function () {
$(".delete-entry-form").on("submit", function (e) {
e.preventDefault();
Swal.fire({
title: "<strong>Are you sure?</strong>",
icon: "warning",
html: `<p>Do you really want to delete this petty cash entry?</p>`,
showCloseButton: true,
showCancelButton: true,
focusConfirm: false,
confirmButtonText: `<i class="fa fa-trash"></i> Yes, delete it!`,
cancelButtonText: `<i class="fa fa-times"></i> Cancel`,
allowOutsideClick: false,
customClass: {
confirmButton: 'red-button'
}
}).then((result) => {
if (result.isConfirmed) {
this.submit();
}
});
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.default', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/LLCF-APP/resources/views/admin/petty-cash-book/index.blade.php ENDPATH**/ ?>