<!doctype html>
<html lang="es">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="Ventas.">
		<meta name="author" content="Edu FX">

		<title><?php echo !empty($title) ? $title : 'Ventas DeMente Games: ';?></title>

		<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
		<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/solid.css" integrity="sha384-ioUrHig76ITq4aEJ67dHzTvqjsAP/7IzgwE7lgJcg2r7BRNGYSK0LwSmROzYtgzs" crossorigin="anonymous">
		<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/fontawesome.css" integrity="sha384-sri+NftO+0hcisDKgr287Y/1LVnInHJ1l+XC7+FOabmTTIK0HnE2ID+xxvJ21c5J" crossorigin="anonymous">

		<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/jquery-ui.css">
		<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/style.css">
		<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/print.css"/>

		<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>

	</head>
	<body>
		<div class="container">
			<?php
				if (!empty($prevendidos)) {
					// titulo: Pedido de [Cliente]
						?>
						<div class="row mt-5">
							<div class="col">
								<h5>Productos en estado <?php echo $estados_ventas[$idEstado]['nombre']; ?></h5>
							</div>
						</div>

						<table class="table table-striped">
						  <thead>
						    <tr>
						      <th scope="col" class="text-center">Cantidad</th>
						      <th class="" style="width: 85%" scope="col">Producto</th>
						    </tr>
						  </thead>
						  <tbody>
						  	<?php 
						  		foreach ($prevendidos as $p) {
						  		 ?>
								    <tr>
								      <td class="text-center"><?php echo $p['prevendidos']?></td>
								      <td class=""><strong><?php echo $p['nombre'] . '</strong> [' . $proveedores[$p['id_proveedor']] . ']'; ?></th>
								    </tr>
								   <?php
								  }
								?>
						  </tbody>
						</table>
					<?php
				}
				else {
					echo 'No se encontraron ventas en el estado seleccionado';
				}
			?>
		</div>
		<script src="<?php echo base_url(); ?>js/jquery-ui.min.js"></script>
		<script src="<?php echo base_url(); ?>js/functions.js"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
		<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
	</body>
</html>