<table class="table table-striped">
	<thead>
		<tr>
			<th></th>
			<th>Creaci&oacute;n</th>
			<th>Final</th>
			<th>Monto</th>
			<th>Saldo</th>
			<th>Estado</th>
		</tr>
	</thead>
	<tbody>
		<?php if(count($creditos)>0): foreach($creditos as $credito):?>
		<tr data-deuda="<?php echo $credito->id_credito;?>">
			<td><div class="radio i-checks-credit creditoradio"><input type="radio" value="option1" name="deuda" <?php if($id):if($credito->id_credito==$id)echo "checked";endif;?>></div></td>
			<td><?php echo $credito->fecha_credito;?></td>
			<td><?php echo date("d-m-Y", strtotime($credito->finalizacion_credito));?></td>
			<td><?php echo $credito->monto_credito;?></td>
			<td><?php echo $credito->saldo_credito;?></td>
			<td>
				<?php switch($credito->estado_credito):
				case 0:?>
				<span class="label label-info">Activo</span>
				<?php break; case 1:?>
				<span class="label">Liquidado</span>
				<?php break; endswitch;?>
			</td>
		</tr>
		<?php endforeach;
		else:?>
			<tr>
				<td colspan="6"><small style="display:block;" class="text-center">No se han encontrados cr&eacute;ditos para este cliente.</small></td>
			</tr>
		<?php endif;?>
	</tbody>
</table>
			
<script>
$(document).ready(function(){
	$('.i-checks-credit').iCheck({
		checkboxClass: 'icheckbox_square-green',
		 radioClass: 'iradio_square-green',
	});
	/* $("#selcredit-btn").click(function(){
		if($('#crediaccion-nuevo').is(':checked') || $('#crediaccion-cargar').is(':checked')){
			
		}else{
			toastr.options = {
				"closeButton": true,
				"progressBar": true,
				"positionClass": "toast-top-right"
			}
			toastr.error('Seleccione una acci&oacute;n para registrar esta venta al cr&eacute;dito');
		}
	}); */
	
});
</script>