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

    <div id="contenedor-dashboard" class="container-fluid ">
        <?php if(in_array(auth()->user()->rol->id, [1])): ?>
            <div class="row ">
                <div class="col-md-12">
                    <h2>Clientes</h2>
                    <a type="button" href="<?php echo e(route('ventas.cliente')); ?>" class="botonColor">Nuevo</a>
                </div>
            </div>
        <?php endif; ?>
    </div>
    <br>
    <table id="example" class="display" style="width:100%">
        <thead>
            <tr>
                <td>ID</td>
                <td>NOMBRE</td>
                <td>NIT</td>
                <td>DPI</td>
                <td>CORREO</td>
                <td>REFERENCIA</td>
                <td>CREDITO</td>
                <td>EJECUTIVO</td>
                <td>Ultima Actualizacion</td>
                <td>ACCIÓN</td>
            </tr>
        </thead>
        <tbody>
            <?php
                $dias_credito_cliente = [
                    1 => 'Contado',
                    2 => '15 dias',
                    3 => '30 días',
                    4 => '45 días',
                    5 => '60 días',
                    6 => '8 días',
                ];
            ?>
            <?php $__currentLoopData = $clientes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cliente): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($cliente['id']); ?></td>
                    <td><a href="<?php echo e(route('ventas.editar_cliente', $cliente['id'])); ?>"
                            target="_blank"><?php echo e($cliente['nombre']); ?></a></td>
                    <td><?php echo e($cliente['nit']); ?></td>
                    <td><?php echo e($cliente['dpi']); ?></td>
                    <td><?php echo e($cliente['correo_electronico']); ?></td>
                    <td><?php echo e($cliente['referencia']); ?></td>
                    <td>
                        <?php echo e($dias_credito_cliente[$cliente['condiciones_pago']] ?? 'No Disponible'); ?>

                    </td>
                    <td><?php echo e($cliente->info_ejecutivo['name'] ?? ''); ?></td>
                    <td><?php echo e($cliente['updated_at']->format('d/m/Y')); ?></td>
                    <td>
                        <?php if(in_array(auth()->user()->rol->id, [1])): ?>
                            <a href="<?php echo e(route('ventas.editar_cliente', $cliente['id'])); ?>" target="_blank"><i
                                    class="fas far fa-edit"></i></a>
                        <?php endif; ?>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('ventas.menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/devpwg5/laravelrp.com/resources/views/ventas/dashboard_clientes.blade.php ENDPATH**/ ?>