<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css">
    <style>
        .daily__expense{
            padding: 60px 0;
        }
        .title{
            text-align: center;
    text-transform: uppercase;
    font-size: 20px;
    margin-bottom: 14px;
    font-weight: 700;
    color: #333;
        }
        
        td {
    height: 19px;
    padding-bottom: 0 !IMPORTANT;
    PADDING-TOP: 0 !important;
    font-size: 12px;
    font-weight: 600;
}
p{
    margin:0 !important;
}

/*@media  print{*/
/*    @page:last {*/
/*    #foot_total {*/
/*    position: fixed;*/
/*    bottom: 0;*/
/*    }*/
/*  }*/
/*}*/

/*  @media  print {*/
/*    tfoot { visibility: hidden; }*/
/*@page  {*/
/*       @bottom-left {*/
/*            content: counter(page) "/" counter(pages);*/
/*        }*/
/*     }*/
/*         tr:nth-last-child(1){*/
/*     visibility: visible;*/
/*    }*/
/*  }*/
  

    </style>
</head>
<body onload="window.print()">
    <div class="container">
        <div class="daily__expense">
            <h3 class="title">All Transaction</h3>
            <table class="table table-bordered ">
                <thead class="table-secondary">
                  <tr>
                    <th scope="col">SR.No</th>
                    <th scope="col">Date</th>
      
                    <th scope="col">Category</th>
                    <th scope="col">Payment Mode</th>
                    <th scope="col">Description</th>
                    <th scope="col">Expense</th>
                    <th scope="col">Income</th>
                    <th scope="col">Credit </th>
                   
                  </tr>
                </thead>
                <tbody>
                    <tr>
                        <th class="text-center" colspan="6"><?php echo e(\Carbon\Carbon::parse($datefrom)->format('d/m/Y')); ?> Between <?php echo e(\Carbon\Carbon::parse($dateto)->format('d/m/Y')); ?></th>
                    </tr>
                    <?php
                    $credit_loan='';
                    $credit='';
                    $debit='';
                    $description='';
                    $type='';
                    $payment_mode='';
                    $total_credit=0;
                    $total_debit=0;
                    $total_credit_loan=0;
                    $transaction_date='';
                    $company_name='';
                    ?>
                    <?php $__currentLoopData = $final_data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            
                    <?php if($dat->type == 'payment'): ?>
                    <?php
                    
                    $credit=round($dat->amount,3);
                    $type=$dat->type;
                    $debit='';
                    $credit_loan='';
                    $payment_mode=$dat->payment_mode;
                    $description=$dat->ledger.'-'.$dat->ledger_value;
                    $transaction_date=$dat->transaction_date;
                    $company_name=$dat->company_name;
                    $total_credit +=$credit;
                    ?>
                    <?php endif; ?>

                    <?php if($dat->type == 'expense'): ?>
                    <?php
                    $credit_loan='';
                    $credit='';
                    $type=$dat->type;
                    $debit=round($dat->amount,3);
                    $payment_mode=$dat->payment_mode;
                    $description=$dat->cat_name;
                    $total_debit +=$debit;
                    $transaction_date=$dat->transaction_date;
                    $company_name=$dat->description;
                    ?>
                    <?php endif; ?>

                    <?php if($dat->type == 'unauthorized-income'): ?>
                    <?php
                    
                    $credit=round($dat->amount,3);
                    $type='unauthorized-income';
                    $debit='';
                    $credit_loan='';
                    $payment_mode=$dat->payment_mode;
                    $description=$dat->description;
                    $transaction_date=$dat->transaction_date;
                    $company_name='';
                    $total_credit +=$credit;
                    ?>
                    <?php endif; ?>

                    <?php if($dat->type =='sale' && $dat->payment_mode !='credit'): ?>
                    <?php
                    $credit='';
                    $type=$dat->type;
                    $credit_loan=round($dat->amount,3);
                    $debit='';
                    $payment_mode=$dat->payment_mode;
                    $description=$dat->ledger.'-'.$dat->ledger_value;
                    $total_credit_loan +=$credit_loan;
                    $transaction_date=$dat->transaction_date;
                    $company_name=$dat->company_name;
                    ?>
                    <?php endif; ?>
                    <?php if($dat->type =='sale' && $dat->payment_mode =='credit'): ?>
                    <?php
                    $credit='';
                    $debit='';
                    $type=$dat->type;
                    $credit_loan=round($dat->amount,3);
                    $payment_mode=$dat->payment_mode;
                    $description=$dat->ledger.'-'.$dat->ledger_value;
                    $total_credit_loan +=$credit_loan;
                    $transaction_date=$dat->transaction_date;
                    $company_name=$dat->company_name;
                    ?>
                    <?php endif; ?>
        


                   


                    
                    
                  <tr>
                    <td class="text-center"><?php echo e(@$i +=1); ?></td>
                     <td class="text-center"><?php echo e(\Carbon\Carbon::parse($transaction_date)->format('d/m/Y')); ?></td>
      
                    <td class="text-center"><?php echo e($type); ?></td>
                    <td class="text-center"><?php echo e($payment_mode); ?> </span></td>
                    <td class="text-center"><?php echo e($description); ?> <?php if($company_name): ?><p style="color:red;font-size: 12px;"><?php echo e($company_name); ?> </p> <?php endif; ?></td>
                        <td><?php echo e($debit); ?></td>
                    <td class="text-center"><?php echo e($credit); ?></td>
                    <td class="text-center"><?php echo e($credit_loan); ?></td>
                   </tr>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <!--<tfoot id="footer_wrapper">-->
                    <tr>
                  <td colspan="3" >TOTAL</td>
                  
                  <td></td>
                  <td></td>
                  <td class="text-center"><?php echo e($total_debit); ?></td>
                  <td class="text-center"><?php echo e($total_credit); ?></td>
                   <td class="text-center"><?php echo e($total_credit_loan); ?></td>
               
                  </tr>
                  <tr>
                  <td colspan="5" >Balance</td>
                  
                  <td colspan="2" ><center><?php echo e($total_credit-$total_debit); ?></center></td>

               <td></td>
                  </tr>
                <!--</tfoot>-->
              </table>

        </div>
    </div>


<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html><?php /**PATH /home/z7a6qwiy0umc/public_html/srkdiesel-trading.in/resources/views/overalla_report.blade.php ENDPATH**/ ?>