<script src="<?php echo ADMIN_URL;?>/assets/js/jquery.dataTables.min.js"></script>
<script src="<?php echo ADMIN_URL;?>/assets/js/dataTables.bootstrap4.min.js"></script>
<script src="<?php echo ADMIN_URL;?>/assets/js/bootstrap-select.min.js"></script>
<script src="<?php echo ADMIN_URL;?>/assets/js/bootstable.js"></script>

<!-- Tabla con listado de servicios programados -->
<div id="divGenerales">

	<div class="row">
		<div class="col-xl-12">
			<div class="breadcrumb-holder">
				<h1 class="main-title float-left"><i class="fa fa-cubes"></i> Servicios programados</h1>
					<ol class="breadcrumb float-right">
                    </ol>
                <div class="clearfix"></div>
            </div>
		</div>
	</div>

	<div id="divTablaServiciosProgramados" class="row collapse show">
		<br/>
		<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
			<div class="card mb-12">		
				<div class="card-body" style="overflow-x: scroll;">
					<table id="tablaServiciosProgramados" class="table table-bordered table-hover display" style="height: auto; width: 100%;" cellspacing="0" width="100%">
						  <thead>
							<tr>
								<th style="text-align: center;">Ver</th>
								<th style="display: none; text-align: center;">IDSERVICIO</th>
								<th style="display: none;">IDEMPRESA</th>
								<th style="text-align: center;">Trazabilidad</th>
								<th style="text-align: center;">Importador</th>
								<th style="display: none;">IDCLIENTE</th>
								<th style="text-align: center;">Cliente</th>
								<th style="display: none;">IDCLIPERSONAL</th>
								<th style="display: none;">IDTIPOCARGA</th>
								<th style="text-align: center;">Carga</th>
								<th style="display: none;">IMO</th>
								<th style="text-align: center;">IMO</th>
								<th style="display: none;">IDDIMCON</th>
								<th style="text-align: center;">Tipo Cont</th>
								<th style="text-align: center;">Num Cont</th>
								<th style="display: none;">SELLOORIGINAL</th>
								<th style="display: none;">SELLONUEVO</th>
								<th style="text-align: center;">Cantidad</th>
								<th style="text-align: center;">Peso</th>
								<th style="display: none;">IDTIPOSERVICIO</th>
								<th style="display: none;">Tipo Servicio</th>
								<th style="display: none;">IDDESMED</th>
								<th style="display: none;">NOMDESMEDIDA</th>
								<th style="display: none;">NOTASCANTIDAD</th>
								<th style="display: none;">UTILIZACANINO</th>
								<th style="display: none;">USACANINO</th>
								<th style="display: none;">NOTASCARGA</th>
								<th style="display: none;">REVISIONNOINTRUSIVA</th>
								<th style="display: none;">USAREVINTRUSIVA</th>
								<th style="display: none;">MUESTREOMERCANCIA</th>
								<th style="display: none;">USAMUESTREO</th>
								<th style="display: none;">OBSERVACIONESMUESTREO</th>
								<th style="display: none;">CLIENTEFACTURAR</th>
								<th style="display: none;">MONTOMATERIAL</th>
								<th style="display: none;">MONTOTOTAL</th>
								<th style="display: none;">Fecha Captura</th>
								<th style="display: none;">IDUSUARIO</th>
								<th style="display: none;">IDESTADO</th>
								<th style="text-align: center;">Status</th>
							</tr>		
						  </thead>
						  <tbody id="tbodyServiciosProgramados" >
							<!-- <tr class="filaServicioProgramado">
								<td>SUELTA</td>
								<td>666</td>
								<td>N/A</td>
								<td>CONSERVAS Y VINAGRES EL CHILITO PICADOR SA</td>
								<td>SI</td>
								<td>1</td>
								<td style="text-align: center;"><button class="btn btn-success addServicioProgramado" style="background-color: green; border-color: green;"><i class="fa fa-plus"/></button></td>
							</tr> -->
						  </tbody>
					</table>
				</div>
			</div>			
		</div>
	</div>
	<button id="btnHideServicios" class="btn btn-link btn-xs" data-toggle="collapse" data-target="#divTablaServiciosProgramados"><i class="fa fa-chevron-up" style="color: green;"></i></button>
</div>

<!-- Pestañas de servicios agregados -->
<div class="row" style="width: 100%;">
	<ul id="listadoTabsServicios" class="nav nav-tabs nav-justified" style="width: 100%;">

	</ul>
</div>

<!-- Contenido con tabs dinamicos(multiples servicios) -->
<div class="row" style="width: 100%;">
	<div id="panelesDetalleServicio" class="tab-content" style="width: 100%;">
	
	</div>
</div>


<div id="divAreaModales">


</div>

    <!-- MODAL CAPTURAR GASTO  -->
	<input type="hidden" value="0" id="hfNidServicio">
    <div class="modal fade" id="popupFacturando">
        <div class="modal-dialog">
            <div class="modal-content modal-xl">
                <div class="modal-header">
                    <h5 class="modal-title">Facturacion</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
					<div id="divProcesandoFacturacion" style="text-align:center;font-size: 18px;color: red;">
						<div>CERRANDO SERVICIO Y FACTURANDO</div>
						<div>ESPERE...</div>
					</div>
                    <div id="divResultadoFacturacion" class="row" style="display:none">
					    <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="form-group">
                                <label>Servicio</label>
                                <div>
                                    <textarea id="txtResultadoServicio" class="form-control" rows="3" placeholder="Maximo 200 caracteres ..."></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="form-group">
                                <label>Factura:<span id="spanResultadoFacturacion"></span></label>
                                <div>
                                    <textarea id="txtResultadoFacturacion" class="form-control" rows="3" placeholder="Maximo 200 caracteres ..."></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button id="btnSalirFacturacion" style="display:none" type="button" class="btn btn-default" data-dismiss="modal"><i class="imgBotton fa fa-times-circle"></i> Salir</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
	
<script src="../test_soap/test.js"></script>
<script src="<?php echo ADMIN_URL;?>/Scripts/serviciosProgramados.js"></script>
<script src="<?php echo ADMIN_URL;?>/Scripts/servicioNotificaciones.js"></script>
