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

    <br/>
    <?php if( auth()->user()->create_ ): ?>
    <a href="<?php echo e(url('/client/create')); ?>"  class="btn" style="background-color:#2C4E71;color:#FFF;margin-left:10px">Create Client </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;"> name    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> address    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> mobile    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> email    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> kind    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> state    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> class    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> trade    </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( $clients as $client ): ?>   
                 
                 

                 
                <tr>
                 
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($client->name); ?> </td>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->address); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->mobile); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->email); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->client_kind ==1? "فرد" : " شركة "); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->client_state); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->client_class); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->trade_kind); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->start_leeh); ?>    </th>
                  <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->start_aleeh); ?>    </th>

                <th style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px"> <?php echo e($client->credit_limit); ?>    </th>
                  <td style="text-align:center; width:50px;word-break: break-word;" > 
                  <?php if( auth()->user()->edit_ ): ?>
                  <a   href='<?php echo e(url("/client/edit/$client->id")); ?>'  > <i class="fa fa-edit" style="font-size:18px"></i>  </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <?php else: ?>
	                  <span>&nbsp;&nbsp;</span>
                  <?php endif; ?>
                  <?php if( auth()->user()->delete_ ): ?>
                  <a   href='#' onclick="return confirm('Are you sure you want to delete this item?');" > <i class="fa fa-trash" style="font-size:18px; color:red"></i>  </a>
                  <?php else: ?>
	                  <span>&nbsp;&nbsp;</span>
                  <?php endif; ?>
                </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(); ?>