<?php $__env->startSection('section-title', 'Account'); ?>
<?php $__env->startSection('page-title', 'Transaction History'); ?>
<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-lg-12">
            <div class="card card-body mb-2" id="h-hide">
                <form action="<?php echo e(route('transaction-history')); ?>">
                    <div class="form-row"> 
                        <div class="form-group col-md-6">
                            <input type="date" name="start_date" class="form-control" value="<?php echo e((isset($sdate))?date('Y-m-d', strtotime($sdate)):''); ?>">
                        </div>
                        <div class="form-group col-md-6">
                            <input type="date" name="end_date" class="form-control" value="<?php echo e((isset($edate))?date('Y-m-d', strtotime($edate)):''); ?>">
                        </div>
                    </div>
                    <div class="form-row mt-2">
                        <div class="form-group col-12">
                            <button class="btn btn-primary" type="submit">
                                    <i class="fa fa-sliders"></i> Filter
                            </button>
                            <a href="<?php echo e(route('transaction-history')); ?>" class="btn btn-info">Reset</a>
                            <a href="" class="btn btn-primary float-right" onclick="window.print()">Print</a>
                        </div>
                    </div>
                </form>
            </div>
            <div class="card m-b-30">
                <div class="card-body">
                    <div class="table-responsive">
                        <table id="datatable-buttons" class="table table-striped table-bordered">
                            <thead class="table-primary">
                                <tr class="text-center">
                                    <th> Date </th>
                                    <th> Transaction Type </th>
                                    <th> Note </th>
                                    <th> Amount </th>
                                    <th> Created By </th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $bank_transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transaction): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr class="text-center">
                                        <td> <?php echo e(date('d-m-Y',strtotime($transaction->date))); ?> </td>
                                        <td> <?php echo e(ucfirst($transaction->trans_type)); ?> from  <?php echo e($transaction->bank_account->bank_name); ?> </td>
                                        <td> <?php echo e(($transaction->note != NULL)?$transaction->note:'NULL'); ?> </td>
                                        <td> <?php echo e(number_format($transaction->amount,2)); ?> TK </td>
                                        <td> <?php echo e($transaction->user->name); ?> </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="10" class="text-center">No Data Found</td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="pagination justify-content-center">
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\fast-pos\resources\views/backend/pages/account/transaction.blade.php ENDPATH**/ ?>