<?php $__env->startSection('content'); ?>
<div class="container-fluid">
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
                    <div class="panel panel-default">
                        <div class="panel-heading"><center>Listado de Créditos del Cliente: <b><?php echo e($ccli." ".$dcli); ?></b></center></div>
                            <div class="panel-body">
                                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                                    <ul class="nav navbar-nav navbar-right">				
                                      <!--  <li><a href="<?php echo e(url('/')); ?>"> Opciones </a></li>--> 
                                       <!-- <li><a href="<?php echo e(url('/Mod_usuario')); ?>"> Atras </a></li>-->
                                    </ul>
                                </div>
                                <?php if(count($errors) > 0): ?>
                                        <div class="alert alert-danger">
						<strong>Whoops!</strong> Hay algunos problemas!!!.<br><br>
                                                    <ul>
							<?php foreach($errors->all() as $error): ?>
                                                            <li><?php echo e($error); ?></li>
							<?php endforeach; ?>
                                                    </ul>
					</div>
				    <?php endif; ?>
                                        
                                    <div class="table-responsive">                                        
                                        <table class="table table-striped table-hover table-bordered">
                                            <tr>
                                                <th class="text-center">Factura</th>
                                                <th class="text-center" colspan="3">Valor</th>
                                                <th class="text-center">Usuario</th>
                                                <th class="text-center" colspan="2">Fecha</th>
                                                <th class="text-center">Acción</th>
                                            </tr>
                                            
                                            <tr class="text-info">
                                                <th class="text-center">#</th>
                                                <th class="text-center">Compra</th>
                                                <th class="text-center">Abonado</th>
                                                <th class="text-center">Restante</th>
                                                <th class="text-center">Fiador</th>
                                                <th class="text-center">Venta</th>
                                                <th class="text-center">Actualización</th>
                                                <th class="text-center">Abonar</th>
                                            </tr>
                                            
                                            <?php foreach($crecli as $crecli): ?>
                                                <tr>
                                                  <td class="text-right"><a href="../detcrecli/<?php echo e($crecli->idcredito); ?>/<?php echo e($crecli->IdVenta_Fin); ?>/<?php echo e($ccli); ?>" target="_blank"><?php echo e($crecli->IdVenta_Fin); ?></a></td>
                                                  <td class="text-right"><?php echo e($crecli->vcompra); ?></td>
                                                  <td class="text-right"><?php echo e($crecli->vpagado); ?></td>
                                                  <td class="text-right"><?php echo e($crecli->vcompra-$crecli->vpagado); ?></td>
                                                  <td class="text-right"><?php echo e($crecli->Nombres); ?> <?php echo e($crecli->Apellidos); ?></td>
                                                  <td class="text-right"><?php echo e($crecli->created_at); ?></td>
                                                  <td class="text-right"><?php echo e($crecli->updated_at); ?></td>
                                                  <td class="text-right"><a href="../abocrecli/<?php echo e($crecli->IdVenta_Fin); ?>/<?php echo e($ccli); ?>" target="_blank"><img src="<?php echo e(url('images/dine.png')); ?>" width="50px" height="30px" /></a></td>
                                                </tr>
                                            <?php endforeach; ?>
                                                <tr><td colspan="7"></td></tr>
                                                <tr>
                                                  <td class="text-right"><b>Total:</b></td>
                                                  <td class="text-right"><?php echo e($sumcom); ?></td>
                                                  <td class="text-right"><?php echo e($sumpag); ?></td>
                                                  <td class="text-right"><?php echo e($sumcom-$sumpag); ?></td>
                                                  <td colspan="4"></td>
                                                </tr>
                                                
                                        </table>                                        
                                    </div>
			</div>
		</div>
	</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>