<?php 
  include_once '../../model/config.php';
  session_start();  
  if(!isset($_SESSION['usuario']))
  {
    header("Location:../../index.php");
  }
  else
  {
    date_default_timezone_set('America/Lima');
 ?>
<!DOCTYPE html>
<html lang="en">
  <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">

    <title><?php echo EMPRESA; ?> | TASAS </title>
    <link rel="icon" href="../../assets/images/icono.ico" type="image/x-icon" />
    
    <!-- Bootstrap -->    
	<link href="../../assets/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../../assets/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="../../assets/css/nprogress.css" rel="stylesheet">

    <!-- Custom Theme Style -->
    <link href="../../assets/css/custom.min.css" rel="stylesheet">
    
	<!-- Datatables -->
    <link href="../../assets/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="../../assets/css/buttons.bootstrap.min.css" rel="stylesheet">
    <link href="../../assets/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
    <link href="../../assets/css/responsive.bootstrap.min.css" rel="stylesheet">
    <link href="../../assets/css/scroller.bootstrap.min.css" rel="stylesheet">

	<!-- bootstrap-daterangepicker -->
    <link href="../../assets/css/daterangepicker.css" rel="stylesheet">

    <link href="../css/estilos.css" rel="stylesheet">
  </head>

	<body class="nav-md">
		<div class="container body">
			<div class="main_container">
				<div class="col-md-3 left_col">
					<div class="left_col scroll-view">
						<!-- top menu -->
						<?php 
						require('../topMenu.php');
						?>
						<!-- /top menu -->

						<br />

						<!-- sidebar menu -->
						<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
						<div class="menu_section">
							<h3>Menú Principal</h3>
							<?php 
							require('../menuIzquierda.php');
							?>
						</div> 
						</div>

						<!-- /sidebar menu -->

						<!-- /menu footer buttons -->
						<!-- <div class="sidebar-footer hidden-small">
						<a data-toggle="tooltip" data-placement="top" title="Settings">
							<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
						</a>
						<a data-toggle="tooltip" data-placement="top" title="FullScreen">
							<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
						</a>
						<a data-toggle="tooltip" data-placement="top" title="Lock">
							<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
						</a>
						<a data-toggle="tooltip" data-placement="top" title="Logout">
							<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
						</a>
						</div> -->
						<!-- /menu footer buttons -->
					</div>
				</div>

				<!-- top navigation -->
				<?php 
				require('../topNavigation.php');
				?> 
				<!-- /top navigation -->

				<!-- page content -->
				<div class="right_col" role="main">
					<!-- top tiles -->  
					
					<div class="clearfix"></div>
					<!-- /top tiles -->

					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<div class="x_panel">
								<div class="x_title">
									<h2>Registro de IGV </h2>
											
									<div class="clearfix"></div>
								</div>

								<div class="x_content">
									<br/>
									<table id="tablaIgv" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
										<thead>
											<tr>
												<th>IGV ID</th>
												<th>Año</th>
												<th>Porcentaje</th>
												<th>Activo</th>
												<th>Opciones</th>
											</tr>
										</thead>
										<tbody id="cuerpoIgv">
										
										</tbody>
									</table>
								</div>
							</div>
						</div> 
					</div>

					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<div class="x_panel">
								<div class="x_title">
									<h2>Registro de Tipo de Cambio</h2>
											
									<div class="clearfix"></div>
								</div>

								<div class="x_content">
									<br/>
									<table id="tablaTasaCambio" class="table table-striped table-bordered dt-responsive" cellspacing="0" width="100%">
										<col width = "20%">
										<col width = "20%">
										<col width = "20%">
										<col width = "10%">
										<col width = "20%">
										<thead>
											<tr>
												<th>Fecha</th>
												<th>Tipo de Moneda</th>
												<th>Precio de Compra</th>
												<th>Precio de Venta</th>												
												<th>Activo</th>
												<th>Opciones</th>
											</tr>
										</thead>
										<tbody id="cuerpoTasaCambio">
										
										</tbody>
									</table>
								</div>
							</div>
						</div> 
					</div>   
				</div>      
				<!-- </div> -->
				<!-- /page content -->

				<!-- footer content -->
				<?php 
					require('../footer.php');
				?>
				<!-- /footer content -->
			</div>
		</div>

		<!-- modal  insert-->
		<div class="modal fade" id="myModal">
			<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">Registrar IGV</h4>
				</div>
				<div class="modal-body">
				<div class="row">            
					<form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left">

					<div class="form-group">
						<label for="cboPeriodo" class = "control-label col-md-3 col-sm-3 col-xs-12">Periodo:</label>
						<div class="col-md-6 col-sm-6 col-xs-12">
						<select id="cboPeriodo" class="form-control col-md-7 col-xs-12" required>
							
						</select>                  
						</div>                        
					</div>

					<div class="form-group">
						<label for="txtPorcentaje" class = "control-label col-md-3 col-sm-3 col-xs-12">Porcentaje:</label>
						<div class="col-md-6 col-sm-6 col-xs-12">
						<input type="text" id="txtPorcentaje" class="form-control col-md-7 col-xs-12" name="txtPorcentaje" required />
						</div>                        
					</div>                                    

					<div class="ln_solid"></div>
					<div class="form-group">
						<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
						<button type="button" class="btn btn-primary" id="btnGuardar">Guardar</button>
						<button type="button" class="btn btn-danger" id="btnCancelar" data-dismiss="modal">Cancelar</button>
						</div>
					</div>
					</form>
				</div>
				</div>
			</div>
			</div>    
		</div>
		<!-- /modal insert-->

		<!-- modal update-->
		<div class="modal fade" id="modalUpdate">
			<div class="modal-dialog alerta">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title">Editar IGV</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<form id="demo-form" data-parsley-validate class="form-horizontal form-label-left">
								<div class="form-group">
									<label for="cboPeriodoE" class = "control-label col-md-3 col-sm-3 col-xs-12">Periodo:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<select id="cboPeriodoE" class="form-control col-md-7 col-xs-12" required>
										
									</select>                  
									</div>                        
								</div>

								<div class="form-group">
									<label for="txtPorcentajeE" class = "control-label col-md-3 col-sm-3 col-xs-12">Porcentaje:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" id="txtPorcentajeE" class="form-control col-md-7 col-xs-12" name="txtPorcentajeE" required />
									</div>                        
								</div> 

								<div class="ln_solid"></div>
								<div class="form-group">
									<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
									<button type="button" class="btn btn-primary" id="btnEditar">Guardar</button>
									<button type="button" class="btn btn-danger"  id="btnCancelarE" data-dismiss="modal">Cancelar</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>    
		</div>
		<!-- /modal-->
  

		<!-- modal  insert-->
		<div class="modal fade" id="myModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title">Registrar IGV</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left">
								<div class="form-group">
									<label for="cboPeriodo" class = "control-label col-md-3 col-sm-3 col-xs-12">Periodo:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<select id="cboPeriodo" class="form-control col-md-7 col-xs-12" required>
										
									</select>                  
									</div>                        
								</div>

								<div class="form-group">
									<label for="txtPorcentaje" class = "control-label col-md-3 col-sm-3 col-xs-12">Porcentaje:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" id="txtPorcentaje" class="form-control col-md-7 col-xs-12" name="txtPorcentaje" required />
									</div>                        
								</div>

								<div class="ln_solid"></div>
								<div class="form-group">
									<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
									<button type="button" class="btn btn-primary" id="btnGuardar">Guardar</button>
									<button type="button" class="btn btn-danger" id="btnCancelar" data-dismiss="modal">Cancelar</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>    
		</div>
		<!-- /modal insert-->


		<!-- modal  insert tasa de cambio-->
		<div class="modal fade" id="modalGuardarTasaCambio">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title">Registrar Tipo de Cambio</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<form id="frmGuardarTasaCambio" data-parsley-validate class="form-horizontal form-label-left">

								<div class="form-group">
									<label for="dtpFechaTasaCambio" class = "control-label col-md-3 col-sm-3 col-xs-12">Fecha:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
										<div>
											<input type="text" class="form-control has-feedback-left" id="dtpFechaTasaCambio"  aria-describedby="inputSuccess2Status4">
											<span class="fa fa-calendar-o form-control-feedback left" aria-hidden="true"></span>
											<span id="inputSuccess2Status4" class="sr-only">(success)</span>
										</div>
									</div>                        
								</div>

								<div class="form-group">
									<label for="cboTipoMoneda" class = "control-label col-md-3 col-sm-3 col-xs-12">Tipo de Moneda:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
										<select id="cboTipoMoneda" class="form-control col-md-7 col-xs-12" required>
											
										</select>
									</div>
								</div>

								<div class="form-group">
									<label for="txtPrecioCompra" class = "control-label col-md-3 col-sm-3 col-xs-12">Precio de Compra:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" id="txtPrecioCompra" class="form-control col-md-7 col-xs-12" name="txtPrecioCompra" required />
									</div>
								</div>

								<div class="form-group">
									<label for="txtPrecioVenta" class = "control-label col-md-3 col-sm-3 col-xs-12">Precio de Venta:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" id="txtPrecioVenta" class="form-control col-md-7 col-xs-12" name="txtPrecioVenta" required />
									</div>
								</div>

								<div class="ln_solid"></div>
								<div class="form-group">
									<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
									<button type="button" class="btn btn-primary" id="btnGuardarTasaCambio">Guardar</button>
									<button type="button" class="btn btn-danger" id="btnCancelarTasaCambio" data-dismiss="modal">Cancelar</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>    
		</div>
		<!-- /modal insert tasa de cambio-->

		<!-- modal  editar tasa de cambio-->
		<div class="modal fade" id="modalEditarTasaCambio">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title">Editar Tipo de Cambio</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<form id="frmEditarTasaCambio" data-parsley-validate class="form-horizontal form-label-left">

								<div class="form-group">
									<label for="dtpFechaTasaCambioE" class = "control-label col-md-3 col-sm-3 col-xs-12">Fecha:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
										<div>
											<input type="text" class="form-control has-feedback-left" id="dtpFechaTasaCambioE"  aria-describedby="inputSuccess2Status4">
											<span class="fa fa-calendar-o form-control-feedback left" aria-hidden="true"></span>
											<span id="inputSuccess2Status4" class="sr-only">(success)</span>
										</div>
									</div>                        
								</div>

								<div class="form-group">
									<label for="cboTipoMonedaE" class = "control-label col-md-3 col-sm-3 col-xs-12">Tipo de Moneda:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
										<select id="cboTipoMonedaE" class="form-control col-md-7 col-xs-12" required>
											
										</select>
									</div>
								</div>

								<div class="form-group">
									<label for="txtPrecioCompraE" class = "control-label col-md-3 col-sm-3 col-xs-12">Precio de Compra:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" id="txtPrecioCompraE" class="form-control col-md-7 col-xs-12" name="txtPrecioCompraE" required />
									</div>
								</div>

								<div class="form-group">
									<label for="txtPrecioVentaE" class = "control-label col-md-3 col-sm-3 col-xs-12">Precio de Venta:</label>
									<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" id="txtPrecioVentaE" class="form-control col-md-7 col-xs-12" name="txtPrecioVentaE" required />
									</div>
								</div>

								<div class="form-group">
									<label class = "control-label col-md-3 col-sm-3 col-xs-12">Activo:</label>
									<div class = "checkbox col-md-3 col-sm-3 col-xs-12">
										<label>
											<input type="checkbox"  id="chkActivoTasaCambioE" checked>
										</label>
									</div>
								</div>

								<div class="ln_solid"></div>
								<div class="form-group">
									<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
									<button type="button" class="btn btn-primary" id="btnEditarTasaCambio">Editar</button>
									<button type="button" class="btn btn-danger" id="btnCancelarTasaCambioE" data-dismiss="modal">Cancelar</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>    
		</div>
		<!-- /modal editar tasa de cambio-->

		<!-- modal eliminar Tasa de Cambio-->
		<div class="modal fade" id="modalEliminarTasaCambio">
			<div class="modal-dialog alerta">
				<div class="modal-content">
					<div class="modal-header">
						<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
							<h4> ¿Desea eliminar esta Tipo de Cambio? </h4>
						</div>
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					</div>
					<div class="modal-body">
						<div class="row">   
							<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
								<button type="button" class="btn btn-primary" id="btnEliminarTasaCambio" data-dismiss="modal">Sí</button>
								<button type="button" class="btn btn-danger"  id="btnCancelarElTC" data-dismiss="modal">No</button>
							</div>
						</div>
					</div>
				</div>
			</div>    
		</div>
    <!-- /modal eliminar Tasa de Cambio-->

		<!-- jQuery -->
		<script src="../../assets/js/jquery.min.js"></script>
		<!-- Bootstrap -->
		<script src="../../assets/js/bootstrap.min.js"></script>
		<!-- FastClick -->
		<script src="../../assets/js/fastclick.js"></script>
		<!-- NProgress -->
		<script src="../../assets/js/nprogress.js"></script>
		
		<!-- Custom Theme Scripts -->
		<script src="../../assets/js/custom.min.js"></script>

    
		<!-- Parsley -->
		<script src="../../assets/js/parsley.min.js"></script>
		<!-- Autosize -->
		<script src="../../assets/js/autosize.min.js"></script>


		<!-- Datatables -->
		<script src="../../assets/js/jquery.dataTables.min.js"></script>
		<script src="../../assets/js/dataTables.bootstrap.min.js"></script>
		<script src="../../assets/js/dataTables.buttons.min.js"></script>
		<script src="../../assets/js/buttons.bootstrap.min.js"></script>
		<script src="../../assets/js/buttons.flash.min.js"></script>
		<script src="../../assets/js/buttons.html5.min.js"></script>
		<script src="../../assets/js/buttons.print.min.js"></script>
		<script src="../../assets/js/dataTables.fixedHeader.min.js"></script>
		<script src="../../assets/js/dataTables.keyTable.min.js"></script>
		<script src="../../assets/js/dataTables.responsive.min.js"></script>
		<script src="../../assets/js/responsive.bootstrap.js"></script>
		<script src="../../assets/js/datatables.scroller.min.js"></script>
		<script src="../../assets/js/jszip.min.js"></script>
		<script src="../../assets/js/pdfmake.min.js"></script>
		<script src="../../assets/js/vfs_fonts.js"></script>

		<!-- bootstrap-daterangepicker -->
    	<script src="../../assets/js/moment.min.js"></script>
    	<script src="../../assets/js/daterangepicker.js"></script>

		<!-- Autosize -->
		<script>
		$(document).ready(function() {
			autosize($('.resizable_textarea'));
		});
		</script>
		<!-- /Autosize -->


		<script src="../js/Mantenedores/despachadorTasas.js"></script>
		
	</body>
</html>
<?php } ?>
