<?php include "../index/conexion.inc" ?>
<?php include "../index/validacion.php" ?>
<!doctype html>
<html lang="es">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<!-- Meta, title, CSS, favicons, etc. -->
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="icon" href="../images/me.ico" type="image/ico" />
		<title>Join Manager</title>
		<!-- Bootstrap -->
		<link href="../config/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
		<!-- Font Awesome -->
		<link href="../config/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
		<!-- NProgress -->
		<link href="../config/vendors/nprogress/nprogress.css" rel="stylesheet">
		<!-- iCheck -->
		<link href="../config/vendors/iCheck/skins/flat/green.css" rel="stylesheet">	
		<!-- Datatables -->
		<link href="../config/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
		<link href="../config/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
		<link href="../config/vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
		<link href="../config/vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css" rel="stylesheet">
		<link href="../config/vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css" rel="stylesheet">
		<!-- Custom Theme Style -->
		<link href="../config/build/css/custom.min.css" rel="stylesheet">
	</head>
	<body>
		<div class="top_nav">
			<div class="container body">
				<div class="main_container">
					<!-- page content -->
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">&times;</button>
							<h4 class="modal-title">NUEVO | Toma</h4>
						</div>
						<form name="tomanew" class="form-vertical" method="POST" action="reporte_06_net_reg.php" enctype="multipart/form-data" onsubmit="return valida_campos();">
							<div class="modal-body">
								<div class="row">
									<div class="col-sm-4">
										<div class="form-group">
											<label>Bodega</label>
											<input type="number" class="form-control" name="cBZT01" value="<?php echo $_GET['id2'] ?>" readonly>
										</div>
									</div>
									<div class="col-sm-4">
										<div class="form-group">
											<label>Ubicacion</label>
											<input type="text" class="form-control" name="cBZT02" required>
										</div>
									</div>
									<div class="col-sm-4">
										<div class="form-group">
											<label>Caja master</label>
											<input type="text" class="form-control" name="cBZT03" required>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-sm-4">
										<div class="form-group">
											<label>Codigo de barras</label>
											<input type="text" class="form-control" name="cBZT04" required>
										</div>
									</div>
									<div class="col-sm-4">
										<div class="form-group">
											<label>Unidades</label>
											<input type="number" class="form-control" name="cBZT05" required>
										</div>
									</div>
									<div class="col-sm-4">
										<div class="form-group">
											<label>Gondola</label>
											<input type="number" class="form-control" name="cBZT06" value="<?php echo $_GET['id3'] ?>" readonly>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-sm-4">
										<div class="form-group">
											<label>Documento</label>
											<input type="number" class="form-control" name="cBZT07" id="cBZ01" value="<?php echo $_GET['id'] ?>" readonly>
										</div>
									</div>
								</div>
								<div class="form-group">
									<button type="submit" class="btn btn-success" name="Agregar">
										<span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> Agregar
									</button>
									<button type="button" class="btn btn-danger" onclick="self.close();">
										<span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span> Cerrar
									</button>
								</div>
							</div>
						</form>
					</div>
					<!-- /page content -->
				</div>
			</div>
		</div>
	</body>
    <!-- jQuery -->
    <script src="../config/vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="../config/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="../config/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="../config/vendors/nprogress/nprogress.js"></script>
    <!-- iCheck -->
    <script src="../config/vendors/iCheck/icheck.min.js"></script>
    <!-- Datatables -->
    <script src="../config/vendors/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="../config/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script src="../config/vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="../config/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
    <script src="../config/vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
    <script src="../config/vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
    <script src="../config/vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="../config/vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
    <script src="../config/vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
    <script src="../config/vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
    <script src="../config/vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
    <script src="../config/vendors/datatables.net-scroller/js/dataTables.scroller.min.js"></script>
    <script src="../config/vendors/jszip/dist/jszip.min.js"></script>
    <script src="../config/vendors/pdfmake/build/pdfmake.min.js"></script>
    <script src="../config/vendors/pdfmake/build/vfs_fonts.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="../config/build/js/custom.min.js"></script>
	</body>
</html>
<script>
	function valida_campos(f)
	{
		if (this.tomanew.cBZT02.value == '')
		{
			alert("Ingrese una ubicacion.");
			this.envios.cBZT02.focus();
			return false;
		}
		if (this.tomanew.cBZT03.value == '')
		{
			alert("Ingrese una caja master.");
			this.envios.cBZT03.focus();
			return false;
		}
		if (this.tomanew.cBZT04.value == '')
		{
			alert("Ingrese un codigo de barras.");
			this.envios.cBZT04.focus();
			return false;
		}
		if (this.tomanew.cBZT05.value == '')
		{
			alert("Igrese unidades.");
			this.envios.cBZT05.focus();
			return false;
		}
		if (this.tomanew.cBZT05.value == 0)
		{
			alert("Igrese unidades.");
			this.envios.cBZT05.focus();
			return false;
		}
		if (this.tomanew.cBZT06.value == '')
		{
			alert("Igrese una gondola.");
			this.envios.cBZT06.focus();
			return false;
		}
		if (this.tomanew.cBZT06.value == 0)
		{
			alert("Igrese una gondola.");
			this.envios.cBZT06.focus();
			return false;
		}
	}
</script>