

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


<style>
  header{display:flex; align-items:center; justify-content: end;gap:14px; padding:16px 18px; border-bottom:3px solid var(--c-primary);}
  header .title{display:flex; flex-direction:column; gap:2px}
  header .title h1{ font-size:20px}
  header .title small{color:#555}
  </style>
 <header>
      <!-- ضع رابط صورتك هنا -->
      
      <div class="title" style="text-align: end;">
        <h1 >سندات الصرف</h1>
        <small>فترة: <?php echo e($from); ?> حتى <?php echo e($to); ?></small>
      </div>
  </header>


<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>

                   <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;">Action</th>
                 </tr>
                  </thead>
               <tbody>
                            
                 <?php foreach( $payment_vouchers as $sand ): ?>   
                  
                 <tr>
                  
                 <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > <?php echo e($sand->created_at); ?> </td>
                   <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ># <?php echo e($sand->id); ?> </td>
                   <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > <?php echo e($sand->type); ?></td>
                   
                   <?php if($sand->type == 'سند صرف عام'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> عام    </th>
                   <?php elseif($sand->type == 'سند صرف موظفين'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> موظفين    </th>
                   <?php elseif($sand->type == 'سند صرف ميزانية'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->budget->name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف سيارات'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->car->num); ?> - - <?php echo e($sand->car_expense->name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف عهدة غير مربوطة بمبلغ'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->trust->name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف عهدة مربوطة بمبلغ'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->trust->name); ?>    </th>
                   <?php endif; ?>


                   <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($sand->pay); ?> </td>
                    
                   <?php if($sand->type == 'سند صرف عام'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->general_name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف موظفين'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->employee->name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف ميزانية'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->general_name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف سيارات'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->general_name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف عهدة غير مربوطة بمبلغ'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->general_name); ?>    </th>
                   <?php elseif($sand->type == 'سند صرف عهدة مربوطة بمبلغ'): ?>
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($sand->general_name); ?>    </th>
                   <?php endif; ?>
                   <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($sand->safe_account->payment_method->name); ?> </td>  
                   
                   <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px">  <?php echo e($sand->tab_id ? $sand->tab->name : ''); ?>   <br>  
                        <a style="
    background:#cbd5e1;
    color:#0f172a;
    padding:6px 12px;
    border-radius:20px;
    font-size:13px;
    font-weight:600;
    text-decoration:none;
    display:inline-block;
   " href='<?php echo e(url("/tab/tabulate_payment_voucher/$sand->id")); ?>' target="_blank"    >
                            <i class="fas fa-edit"></i>
   
   </a>
                   </th>
                   
                   <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" >
                       <?php echo e($sand->note1); ?>

                   </td>
                   
                   <?php if( $sand->approve == "Waiting" ): ?>
                   <td style="text-align:center;  font-weight:900;border-color:#0000003c;font-size:18px; background-color:orange" > Waiting...</td>
                   <?php elseif( $sand->approve == "Approved" ): ?>
                   <td style="text-align:center;  font-weight:900;border-color:#0000003c;font-size:18px;background-color:green;color:#FFF" >  Approved </td>
                   <?php else: ?>
                   <td style="text-align:center;  font-weight:900;border-color:#0000003c;font-size:18px;background-color:red" >  Rejected </td>
                   <?php endif; ?> 
 
                   <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($sand->note2); ?> </td>
                   <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > 
        <?php if( $sand->approve == "Approved" || $sand->approve == "Rejected" ): ?>
        <a   href='<?php echo e(url("/payment_voucher/print/$sand->id")); ?>'> Print</a> </td>
        <?php endif; ?>
                 </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(); ?>