<?php $__env->startSection('title','Listado de clientes'); ?>
<?php $__env->startSection('content'); ?>

<div class="card mb-4" style="width: 70% ;margin:0 auto">
    <div class="card-header">
        <i class="fas fa-table me-1"></i>
        Solicitudes de credito
    </div>
    <div class="card-body">
        <div style="padding: 5px">
            <a href="<?php echo e(url('/clients/create')); ?>" title="Crear cliente" class="btn btn-primary" ><i class="fa-solid fa-user-tie"></i></a>
        </div>

        <table  class="table table-hover table-bordered" style="width:100%">
            <thead style ="font-size: 14px" >
                <tr>
                    <th>&nbsp;&nbsp;&nbsp;&nbsp;</th>
                    <th>&nbsp;&nbsp;&nbsp;&nbsp;</th>
                    <th style="text-align:center">FECHA DE SOLICITUD </th>
                    <th style="text-align:center">REFERENCIA</th>
                    <th style="text-align:center">CALIDAD DEL TITULAR</th>
                    <th style="text-align:center">TITULO VALOR</th>
                    <th style="text-align:center">NOMBRES Y APELLIDOS</th>
                    <th style="text-align:center">IDENTIFICACION</th>
                    <th style="text-align:center">FECHA DE NACIMIENTO</th>
                    <th style="text-align:center">EDAD</th>
                    <th style="text-align:center">FECHA DE EXPEDICION</th>
                    <th style="text-align:center">DIRECCION</th>
                    <th style="text-align:center">EMAIL</th>
                    <th style="text-align:center"> BARRIO</th>
                    <th style="text-align:center">ESTADO CIVIL</th>
                    <th style="text-align:center">INFORMACION DE CONTACTO</th>
                    <th style="text-align:center">NIT EMPRESA</th>
                    <th style="text-align:center"> EMPRESA DONDE TRABAJA</th>
                    <th style="text-align:center">DIRECCION PRINCIPAL</th>
                    <th style="text-align:center"> EMPRESA EN MISION</th>
                    <th style="text-align:center"> NIT EMPRESA EN MISION</th>
                    <th style="text-align:center"> DIRECCION SUCURSAL</th>
                    <th style="text-align:center">FECHA DE INGRESO</th>
                    <th style="text-align:center">SALARIO PROMEDIO MENSUAL</th>
                    <th style="text-align:center"> CARGO ACTUAL</th>
                    <th style="text-align:center"> FRECUENCIA DE PAGO</th>
                    <th style="text-align:center">FECHA DE PAGO EMPRESA</th>
                    <th style="text-align:center"> FECHA DE PAGO CLIENTE </th>
                    <th style="text-align:center">TIPO DE CONTRATO</th>
                    <th style="text-align:center">EPS</th>
                    <th style="text-align:center">ARL   </th>
                    <th style="text-align:center">NIVEL DE ESTUDIOS  </th>
                    <tH style="text-align:center">VEHICULO  </th>
                    <th style="text-align:center">PROPIEDADES </th>
                    <th style="text-align:center">EMBARGO </th>
                    <th style="text-align:center">CREDITO SOLICITADO ($ Cop) </th>
                    <th style="text-align:center">PLAZO (Meses)   </th>
                    <th style="text-align:center">GARANTIA  </th>
                </tr>
            </thead>
            <tbody style ="font-size: 12px">
                <?php $__currentLoopData = $clients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td style="width:100%">
                        <form method="POST"  action="<?php echo e(url('/clients')); ?>/<?php echo e($item->id); ?>"  style="display:inline">
                            <?php echo csrf_field(); ?>
                            <?php echo e(method_field('DELETE')); ?>

                            <button type="button" title="Eliminar" onclick="validar(this,'¿Desea eliminar el registro?')" class="btn btn-danger btn-sm" ><i class="fa-solid fa-trash"></i></button>
                        </form>

                    </td>
                    <td><a href="<?php echo e(url('/clients')); ?>/<?php echo e($item->id); ?>/edit" title="Editar" class="btn btn-warning btn-sm"><i class="fa-solid fa-pencil"></i></a></td>
                    <td><?php echo e(date("d/m/Y", strtotime($item->created_at))); ?></td>
                    <td><?php echo e($item->reference); ?></td>
                    <td><?php echo e($item->quality_holders); ?></td>
                    <td><?php echo e($item->value_Title); ?></td>
                    <td><?php echo e($item->name_last_name); ?></td>
                    <td><?php echo e($item->identification); ?></td>
                    <td><?php echo e(date("d/m/Y", strtotime($item->date_birth))); ?></td>
                    <td><?php echo e($item->age.' años'); ?></td>
                    <td><?php echo e(date("d/m/Y", strtotime($item->expedition_date))); ?></td>
                    <td><?php echo e($item->address); ?></td>
                    <td><?php echo e($item->email); ?></td>
                    <td> <?php echo e($item->neighborhood); ?></td>
                    <td><?php echo e($item->marital_status); ?></td>
                    <td><?php echo e($item->contact_informations); ?></td>
                    <td><?php echo e($item->nit); ?></td>
                    <td><?php echo e($item->Company_works); ?></td>
                    <td><?php echo e($item->main_address); ?></td>
                    <td><?php echo e($item->company_on_mission); ?></td>
                    <td><?php echo e($item->nit); ?></td>
                    <td><?php echo e($item->branch_address); ?></td>
                    <td><?php echo e(date("d/m/Y", strtotime($item->entry_date))); ?></td>
                    <td>$<?php echo e(number_format($item->average_monthly_salary)); ?></td>
                    <td><?php echo e($item->current_position); ?></td>
                    <td><?php echo e($item->payment_frequency); ?></td>
                    <td><?php echo e($item->company_payment_date); ?></td>
                    <td><?php echo e($item->customer_payment); ?> </td>
                    <td><?php echo e($item->contract_type); ?></td>
                    <td><?php echo e($item->eps_affiliate); ?></td>
                    <td><?php echo e($item->arl_affiliate); ?></td>
                    <td><?php echo e($item->level_study); ?>  </td>
                    <td><?php echo e($item->vehicle==1?'Si':'No'); ?>  </td>
                    <td><?php echo e($item->estate==1?'Si':'No'); ?>  </td>
                    <td><?php echo e($item->seizure); ?> </td>
                    <td>$<?php echo e(number_format( $item->ammount)); ?>  </td>
                    <td><?php echo e($item->term); ?>    </td>
                    <td><?php echo e($item->warranty); ?>  </td>

                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('shared/layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\api-loan\resources\views/Client/index.blade.php ENDPATH**/ ?>