

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

    <br/>
    <?php if( auth()->user()->create_ ): ?>
    <a href="<?php echo e(url('/trust/create')); ?>"  class="btn" style="background-color:#2C4E71;color:#FFF;margin-left:10px">Create New trust </a><br/><br/>
    <?php else: ?>
	    <span>&nbsp;&nbsp;</span>
    <?php endif; ?>

 
    
    <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;"> Actions  </th>

                 </tr>
                 </thead>
              <tbody>
                           
                <?php foreach( $trusts as $trust ): ?>   
                 
                 

                 
                <tr style="background-color:<?php echo e($trust->approve=='Approved'?'':'#'); ?>">
                 
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($trust->name); ?> </td>
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($trust->type); ?> </td>

                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($trust->status); ?> </td>
                  
                  
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > 
                  
                  <?php echo e($trust->total_invoices ? $trust->total_invoices : '0'); ?>

                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  
                  <?php if($trust->status == "Active"): ?>
                  <a   href='<?php echo e(url("/trust/invoices_amount/$trust->id")); ?>'  style="color:red">   <i class="fa fa-pencil" style="font-size:18px"></i> </a>
                  <?php endif; ?>
                  
                </td>

                  
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > 
                 
                  <a   href='<?php echo e(url("/trust/edit/$trust->id")); ?>'  > <i class="fa fa-edit" style="font-size:18px"></i>  </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 
                  
                  <a   href='<?php echo e(url("/trust/not_tie_details/$trust->id")); ?>'  style="color:green" > تفاصيل  </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                </td>

                </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(); ?>