
<?php $__env->startSection('title','Home Page'); ?>
<?php $__env->startSection('main'); ?>



<?php if($role == 1): ?>
<div class="container-fluid">
  <div class="row">
    <div class="col-2 offset-1 p-3 mb-2 bg-primary text-white shadow p-3 text-center rounded">
        <h2><i class="fa-solid fa-receipt"></i></h2>
        <h4><b>Receivables</b></h4>
        <h5><b><?php echo e(number_format($receivables,0)); ?></b></h5>
    </div>
    <div class="col-2 p-3 mb-2 bg-danger text-white shadow p-3 text-center rounded">
        <h2><i class="fa-solid fa-file-invoice-dollar"></i></h2>
        <h4><b>Payables</b></h4>
        <h5><b><?php echo e(number_format($payable,0)); ?></b></h5>
    </div>
    <div class="col-2 p-3 mb-2 bg-success text-white shadow p-3 text-center rounded">
        <h2><i class="fa-solid fa-hourglass"></i></h2>
        <h4><b>Vacants</b></h4>
        <h5><b><?php echo e(number_format($vacant,0)); ?></b></h5>
    </div>

    <div class="col-2 p-3 mb-2 bg-info text-dark shadow p-3 text-center rounded">
        <h2><i class="fa-solid fa-coins"></i></h2>
        <h4><b>Capital</b></h4>
        <h5><b><?php echo e(number_format($capital,0)); ?></b></h5>
    </div>
    <div class="col-2 p-3 mb-2 bg-dark text-warning shadow p-3 text-center rounded">
        <h2><i class="fa-solid fa-sack-dollar"></i></h2>
        <h4><b>Cash</b></h4>
        <h5><b><?php echo e(number_format($cash_in_hand,0)); ?></b></h5>
    </div>
</div>
</div>
<?php endif; ?>
</br>
</br>


            <table class="table table-sm table-dark table-striped" style="font-family: 'Comic Sans MS', cursive;">
                
                <tr>
                    <th>Date</th>
                    <th>Project Name</th>
                    <th>Account Name</th>
                    <th>Description</th>
                    <th class="text-end">Debit</th>
                    <th class="text-end">Credit</th>
                </tr>

                <?php $__currentLoopData = $output; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td> <?php echo e(date('d-M-y', strtotime($data->date))); ?></td>
                    <td> <?php echo e($data->ProjectName); ?></td>
                    <td> <?php echo e($data->account_name); ?></td>
                    <td> <?php echo e(Str::of($data->description)->limit(60)); ?></td>
                    <td class="text-end"> <?php echo e(number_format($data->debit,0)); ?></td>
                    <td class="text-end"> <?php echo e(number_format($data->credit,0)); ?></td>
                </tr>        
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </table>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/alameenb/public_html/resources/views//main.blade.php ENDPATH**/ ?>