

<?php $__env->startSection('content'); ?>


 
    
    <div class="card">
               
              <!-- /.card-header -->
              <div class="card-body">
                <table id="example1" class="table table-bordered table-striped">
                  <thead>
                  
                 <tr >
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> تاريخ نشأة الشيك    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> العميل    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> نوع الشيك   </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> الرقم    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> مسحوب علي    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> تاريخ استحقاق  الدفع    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> المبلغ    </th>                  
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> الحاله   </th> 
                 </tr>
                 </thead>
              <tbody>
                           
                <?php foreach( $cheques as $cheque ): ?>   
                 
                <tr>
                 
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($cheque->created_at); ?> </td>
                  <?php if($cheque->client_id): ?>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($cheque->client->name); ?>    </th>
                  <?php elseif( $cheque->payment_voucher_id  && $cheque->payment_voucher->budget_id ): ?>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($cheque->payment_voucher->budget->name); ?>    </th>
                  <?php elseif( $cheque->payment_voucher_id  && $cheque->payment_voucher->employee_id): ?>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px">   <?php echo e($cheque->payment_voucher->employee->name); ?>  </th>
                  <?php elseif($cheque->payment_voucher_id  &&  $cheque->payment_voucher->car_id): ?>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px">   <?php echo e($cheque->payment_voucher->car_expense->name); ?>  </th>
                  <?php elseif($cheque->payment_voucher_id  && $cheque->payment_voucher->general_name ): ?>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px">   <?php echo e($cheque->payment_voucher->general_name); ?>  </th>
                   <?php else: ?>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px">
                      
                      <?php echo e($cheque->general_name); ?>

                           </th>
                  <?php endif; ?>

                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> 
                  <?php if($cheque->invoice_id): ?>
                  <span><a   href='<?php echo e(url("/invoice/details/$cheque->invoice_id")); ?>'  > # <?php echo e($cheque->invoice_id); ?> &nbsp;&nbsp; </a>    فاتورة &nbsp;&nbsp; </span>
                  <?php elseif( $cheque->payment_voucher_id  ): ?>
                  <span>  <?php echo e($cheque->payment_voucher->type); ?></span>
                  <?php else: ?>
                  <span>  سند  قبض عام </span>
                  <?php endif; ?>
                 </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px">
                       
                     <span><a   href='<?php echo e(url("/cheque/details/$cheque->id")); ?>'  > #<?php echo e($cheque->serial); ?>  </a>    </span>
                    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($cheque->bank->name); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($cheque->date); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($cheque->pay); ?>    </th>

                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> 
                   
                  <?php if($cheque->status == Null): ?>
                  <span class="badge bg-warning"> Waiting... </span>
                  <?php elseif( $cheque->status == "Accepted" ): ?>
                  <span class="badge bg-success">  تم الصرف</span>
                  <?php else: ?>
                  <span class="badge bg-danger">  تم الرفض </span>
                  <?php endif; ?>

                  </th>

                </tr>
               <?php endforeach; ?>
                </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>  


            <?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.masterHome2', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>