<!-- PANEL ADMINISTRATIVO -->	
<?php 
	include'conex_sql_server.php';
	$recreo=mysql_query("select * from  tabla_factura_xls_2  ORDER BY id DESC ",$link);
	$ver_recreo=mysql_fetch_array($recreo);	
	$contador=$ver_recreo['n_factura'];
	if($contador==''){
		$contador='00018884';
	}
	if($contador!=''){
		$contador=str_pad($contador, 8, "0", STR_PAD_LEFT);
	}
	//echo $contador;
		//mysql_query("TRUNCATE TABLE tabla_factura_xls_2",$link);
		$cuerpo_fact = sqlsrv_query($conn,"SELECT * FROM SAITEMFAC where NumeroD>='$contador' and TipoFac='A' ");
		while( $row_cuerpo = sqlsrv_fetch_array($cuerpo_fact, SQLSRV_FETCH_ASSOC)){
			$NumeroDx=$row_cuerpo['NumeroD'];
			$cabecera_fact = sqlsrv_query($conn,"SELECT * FROM SAFACT where NumeroD='$NumeroDx' and TipoFac='A'  ");
			$row = sqlsrv_fetch_array($cabecera_fact, SQLSRV_FETCH_ASSOC);
			$Cantidad=$row_cuerpo['Cantidad'];
			$NumeroD=$row['NumeroD'];
			$cod_producto=$row_cuerpo['CodItem'];
			$Descrip_producto=preg_replace('([^A-Za-z0-9])',' ',$row_cuerpo['Descrip1']);
			$cliente=preg_replace('([^A-Za-z0-9])',' ',$row['Descrip']);
			$Date = $row_cuerpo['FechaE']->format('Y-m-d');
			$TipoFac=$row_cuerpo['TipoFac'];
			$ONroLinea=$row_cuerpo['ONroLinea'];
				$v_recreo=mysql_query("select * from  tabla_factura_xls_2  where cod_cliente='".$row['CodClie']."' and n_factura='".$NumeroD."' and fecha_factura='".$Date."' and cod_producto='".$cod_producto."' and ONroLinea='".$ONroLinea."' ",$link);
				$ver_recreo_v=mysql_fetch_array($v_recreo);
				$control_v=$ver_recreo_v['id'];	
					// $row['TipoFac'].'-'.$row['NumeroD'].'-'.$row['CodClie'].'-'.$row['Descrip'].' - '.$Date.'     -  <b>PESO: </b>  '.$Cantidad.'<br>';
					if($control_v==''){
						mysql_query("INSERT INTO tabla_factura_xls_2 (cod_cliente,descripcion,tipo_documento,n_factura,fecha_factura,cod_producto,Descrip_producto,peso_factura,ONroLinea) VALUES	('".$row['CodClie']."','".$cliente."','".$TipoFac."','".$NumeroD."','".$Date."','".$cod_producto."','".$Descrip_producto."','".$Cantidad."','".$ONroLinea."')",$link);
						//echo "INSERT INTO tabla_factura_xls_2 (cod_cliente,descripcion,tipo_documento,n_factura,fecha_factura,cod_producto,Descrip_producto,peso_factura) VALUES	('".$row['CodClie']."','".$row['Descrip']."','".$TipoFac."','".$NumeroD."','".$Date."','".$cod_producto."','".$Descrip_producto."','".$Cantidad."')";
					}
}
	
	
	
	$consultar_sql_ver_sumax3=mysql_query("select SUM(monto_factura),SUM(monto_dolares),eliminar,fecha_factura,id,SUM(peso_factura) from  tabla_factura_xls	 where eliminar='0' and fecha_factura='$fecha_actualxls' ORDER BY id DESC ",$link);
	$ver_consultar_sql_ver_sumax3=mysql_fetch_array($consultar_sql_ver_sumax3);
	$recreo=mysql_query("select SUM(peso_factura),fecha_factura from  tabla_factura_xls_2 where eliminar='0' and fecha_factura='$fecha_actualxls' and estatus='0' ",$link);
	$ver_recreo=mysql_fetch_array($recreo);
	$peso_rc=$ver_recreo['SUM(peso_factura)'];
	$peso_total=$peso_rc+$ver_consultar_sql_ver_sumax3['SUM(peso_factura)'];	

	
	
?>
<script src="js/jquery.min.js"></script>  
<script src="js/bootstrap.min_busqueda.js"></script> 
 <style type="text/css">
.Fields {
	background-color: #00ff80;
	border: 2px solid #ee0000;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 50px;
}
.Fieldss {
	background-color: #00ff80;
	border: 2px solid #ee0000;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 50px;
}
</style>
<div class="contentpanel">

<?php

if($_GET['proceso']=="1NS3RT_vehiculos"){
				$placa=strip_tags($_POST['placa']);
				$cedula_chofer=strip_tags($_POST['cedula_chofer']);
				$nombre_chofer=strip_tags($_POST['nombre_chofer']);
				$descripcion_vehiculo=strip_tags($_POST['descripcion_vehiculo']);
				$cat_vehiculos=strip_tags($_POST['cat_vehiculos']);
				$chequear_datos=mysql_query("Select * from  tabla_vehiculos_xls where placa='$placa' and eliminar='0'",$link);
				$chequear=mysql_fetch_row($chequear_datos);
				if($chequear[0]!="")
					{
					echo'
                        <div class="alert alert-warning fade in">
                            <i class="fa-fw fa fa-warning"></i>
                                <strong>Advertencia !</strong> Datos ya registrados en la base de datos.
                        </div>
						';
					}   
				else 
					{ 
					mysql_query("INSERT INTO tabla_vehiculos_xls (placa,cedula_chofer,nombre_chofer,descripcion_vehiculo,cat_vehiculos) VALUES ('".$placa."','".$cedula_chofer."','".$nombre_chofer."','".$descripcion_vehiculo."','".$cat_vehiculos."')",$link);
					echo'
                        <div class="alert alert-success fade in">
                            <i class="fa-fw fa fa-check"></i>
                               <strong>Exelente !</strong> Muchas gracias datos registrados.
                        </div>
					';
					}
			}
if($_GET['proceso']=="1NS3RT_vehiculos_peso_inicial"){
				$cod_vehiculo=strip_tags($_POST['cod_vehiculo']);
				$peso_inicial=strip_tags($_POST['peso_inicial']);
				$fecha=$fecha_actualxls;
				$hora_inicial=date('h:i:s A');
				$chequear_datos=mysql_query("Select * from  tabla_vehiculos_peso_xls where fecha='$fecha' and cod_vehiculo='".$cod_vehiculo."' and eliminar='0'",$link);
				$chequear=mysql_fetch_row($chequear_datos);
				if($chequear[0]!="")
					{
					echo'
                        <div class="alert alert-warning fade in">
                            <i class="fa-fw fa fa-warning"></i>
                                <strong>Advertencia !</strong> Datos ya registrados en la base de datos.
                        </div>
						';
					}   
				else 
					{ 
					mysql_query("INSERT INTO tabla_vehiculos_peso_xls (fecha,cod_vehiculo,peso_inicial,hora_inicial,operador1) VALUES ('".$fecha."','".$cod_vehiculo."','".$peso_inicial."','".$hora_inicial."','".$codigo."')",$link);
					echo'
                        <div class="alert alert-success fade in">
                            <i class="fa-fw fa fa-check"></i>
                               <strong>Exelente !</strong> Muchas gracias datos registrados.
                        </div>
					';
					}
			}
		if($_GET['proceso']=="D3L3T3"){
			$id_control=$_GET['token'];
			mysql_query("update tabla_vehiculos_xls set eliminar='1'  where  id='$id_control'",$link);
					echo'
                        <div class="alert alert-warning fade in">
                            <i class="fa-fw fa fa-warning"></i>
                               <strong>Advertencia !</strong> El registro fue eleminado de la Base de Datos.
                        </div>	
					';
		}
		if($_GET['proceso']=="D3L3T3_peso_v"){
			$id_control=$_GET['token'];
			mysql_query("update tabla_vehiculos_peso_xls set eliminar='1'  where  id='$id_control'",$link);
					echo'
                        <div class="alert alert-warning fade in">
                            <i class="fa-fw fa fa-warning"></i>
                               <strong>Advertencia !</strong> El registro fue eleminado de la Base de Datos.
                        </div>	
					';
		}
		
//CHEQUEO DE SUMA PESO		
if($_GET['proceso']=="consultar_peso"){
	$checkbox = $_POST['suma_peso'];
	$suma = 0;
		if(count($checkbox) > 0){ 
			foreach($checkbox as $valor){
				$suma += $valor;
			}
		}
	$suma;
}

?>


<div class="row row-stat">
	<div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="panel-btns">
                    <a href="#" class="panel-minimize tooltips" data-toggle="tooltip" title="Minimize Panel"><i class="fa fa-minus"></i></a>
                    <a href="#" class="panel-close tooltips" data-toggle="tooltip" title="Close Panel"><i class="fa fa-times"></i></a>
                </div>
                <h4 class="panel-title"><?php echo $ver_cpanel_sub_menu['titulo']; ?></h4>
                <p><?php echo $ver_cpanel_sub_menu['descripcion']; ?>.</p>
            </div>
<!-- TOTALIZAR -->	
<br>
<div class="row row-stat">

						<div class="col-md-4">
                                <div class="panel panel-info-alt">
                                    <div class="panel-heading noborder">
                                        <div class="panel-btns">
                                            <a href="#" class="panel-close tooltips" data-toggle="tooltip" title="Close Panel"><i class="fa fa-times"></i></a>
                                        </div><!-- panel-btns -->
                                        <div class="panel-icon"><i class="fa fa-check-square-o"></i></div>
                                        <div class="media-body">
                                            <h5 class="md-title nomargin">RC</h5>
                                            <h1 class="mt5"><?php echo  number_format($peso_rc, 2, ',','').' Kg.'; ?></h1>
                                        </div><!-- media-body -->
                                        <hr>
                                       
                                    </div><!-- panel-body -->
                                </div><!-- panel -->
                            </div>
		
		<!-- col-md-4 -->
                            <div class="col-md-4">
                                <div class="panel panel-info-alt">
                                    <div class="panel-heading noborder ">
                                        <div class="panel-btns">
                                            <a href="#" class="panel-close tooltips" data-toggle="tooltip" title="Close Panel"><i class="fa fa-times"></i></a>
                                        </div><!-- panel-btns -->
                                        <div class="panel-icon"><i class="fa fa-check-square"></i></div>
                                        <div class="media-body">
                                            <h5 class="md-title nomargin">AMANACU</h5>
                                            <h1 class="mt5"> <?php echo  number_format($ver_consultar_sql_ver_sumax3['SUM(peso_factura)'], 2, ',','').' Kg.'; ?></h1>
                                        </div><!-- media-body -->
                                        <hr>
                                       
                                    </div><!-- panel-body -->
                                </div><!-- panel -->
                            </div><!-- col-md-4 -->

							<div class="col-md-4">
                                <div class="panel panel-dark  noborder">
                                    <div class="panel-heading noborder">
                                        <div class="panel-btns">
                                            <a href="#" class="panel-close tooltips" data-toggle="tooltip" title="Close Panel"><i class="fa fa-times"></i></a>
                                        </div><!-- panel-btns -->
                                        <div class="panel-icon"><i class="fa fa-refresh"></i></div>
                                        <div class="media-body">
                                            <h5 class="md-title nomargin">TOTAL KG. </h5>
                                          <h1 class="mt5"> <?php echo  number_format($peso_total, 2, ',','').' Kg' ; ?></h1>
                                        </div><!-- media-body -->
                                        <hr>
                                       
                                    </div><!-- panel-body -->
                                </div><!-- panel -->
                            </div>							
					
							
                        </div>		
<!-- FIN TOTALIZAR -->	
				  <form action="<?php echo $url_global.'&proceso=consultar_peso'?>" method="POST" class="form-bordered" name='formulario'>
		
						<div class="pull-right">
						    <div class="btn-group">
                                <button class="btn btn-success btn-sm " type="button" data-toggle="modal" data-target=".bs-example-modal-lg"><i class="fa  fa-plus-square mr5"></i> AGREGAR VEHICULOS</button>
                                <button class="btn btn-primary btn-sm " type="button" data-toggle="modal" data-target=".bs-example-modal-lg-pesov"><i class="fa  fa-car mr5"></i> PESO DE ENTRADA </button>
								<button class="btn btn-warning btn-sm " type="button" data-toggle="modal" data-target=".bs-example-modal-lg-pesosalida"><i class="fa  fa-car mr5"></i> PESO DE SALIDA </button>
						   </div>
						</div>			
			
			<br>
			<br>
					<div class="input-group mb15 has-warning">
                            <span class="input-group-addon"><b>BUSCAR</b></span>
                            <input type="text" autofocus="autofocus" placeholder="Buscar bancos,referencias" id="search" class="form-control" />
                    </div>			
			
			
            <div class="panel-body nopadding">
				<table id="employee_table"  class="table table-striped table-bordered responsive" border='1' >
                                <thead class="">
                                    <tr>
                                        <th>FECHA</th>
                                        <th>ORIGEN</th>
                                        <th>CLIENTE</th>
                                        <th>DUCUMENTO</th>
                                        <th>PESO</th>
                                        <!--<th>VEHICULO</th>-->
                                        <th>ACCION</th>
                                    </tr>
                                </thead>
								
                                <tbody>
<?php 								
	$consultar_sql_recreo=mysql_query("select SUM(peso_factura),fecha_factura,cod_cliente,descripcion,n_factura from  tabla_factura_xls_2 where estatus='0' and eliminar='0' and fecha_factura='$fecha_actualxls' GROUP BY n_factura ORDER BY id DESC",$link);
	while($ver_recreo=mysql_fetch_array($consultar_sql_recreo)){
	$id_control=$ver_recreo['n_factura'];	
?>									
								    <tr>
                                        <td><?php echo $ver_recreo['fecha_factura']; ?></td>
                                        <td>RC</td>
                                        <td><?php echo $ver_recreo['cod_cliente']; ?> - <?php echo $ver_recreo['descripcion']; ?></td>
                                        <td><?php echo str_pad($ver_recreo['n_factura'], 8, "0", STR_PAD_LEFT); ?></td>
                                        <td><?php echo number_format($ver_recreo['SUM(peso_factura)'], 2, ',',''); ?> Kg.</td>
                                        <!--<td>VEHICULO</td>
											<td><button title="Eliminar"  class=" btn-primary btn-xs" data-toggle="modal" data-toggle="modal" data-target="#myModal-<?php echo $id_control; ?>"> <i class="fa fa-car ml5"></i> PESAR </button></td>
										-->
										<td><input type="checkbox" name="suma_peso[]" value="<?php echo $ver_recreo['SUM(peso_factura)']; ?>"></td>

									</tr>
<?php } ?>	
<?php 								
	$consultar_sql_amanacu=mysql_query("select * from  tabla_factura_xls where estatus='0' and eliminar='0' and fecha_factura='$fecha_actualxls' ",$link);
	while($ver_amanacu=mysql_fetch_array($consultar_sql_amanacu)){	
	$id_control='x1-'.$ver_amanacu['id'];
		$consultar_sql_clientex=mysql_query("select * from  tabla_clintes_xls where eliminar='0' and id='".$ver_amanacu['cod_cliente']."'",$link);
		$ver_consultar_sql_clientex=mysql_fetch_array($consultar_sql_clientex);
	
?>									
								    <tr>
                                        <td><?php echo $ver_amanacu['fecha_factura']; ?></td>
                                        <td>AMANACU</td>
                                        <td><?php echo $ver_consultar_sql_clientex['rif']; ?> - <?php echo $ver_consultar_sql_clientex['descripcion']; ?></td>
                                        <td><?php echo $ver_amanacu['n_factura']; ?></td>
                                        <td><?php echo number_format($ver_amanacu['peso_factura'], 2, ',',''); ?> Kg.</td>
                                        <!--<td>VEHICULO</td>-->
                                        <td><button  name="submit" value='Guardar' class="btn btn-primary btn-xs" data-toggle="modal" data-target="#myModal-<?php echo $id_control; ?>"> <i class="fa fa-car ml5"></i> PESAR </button></td>
                                    </tr>
<?php } ?>									
                                </tbody>
                            </table>

</form>							
<script>  
								  $(document).ready(function(){  
									   $('#search').keyup(function(){  
											search_table($(this).val());  
									   });  
									   function search_table(value){  
											$('#employee_table tr').each(function(){  
												 var found = 'false';  
												 $(this).each(function(){  
													  if($(this).text().toLowerCase().indexOf(value.toLowerCase()) >= 0)  
													  {  
														   found = 'true';  
													  }  
												 });  
												 if(found == 'true')  
												 {  
													  $(this).show();  
												 }  
												 else  
												 {  
													  $(this).hide();  
												 }  
											});  
									   }  
								  });  
							 </script>							
					<br>
			
			
 



			
            </div>     
            </div>
        </div>
	</div>
</div>
<!--MODAL -->
  <!--MODAL -->
    <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog">
            <div class="modal-dialog modal-lg">
              <div class="modal-content">
                  <div class="modal-header">
                      <button aria-hidden="true" data-dismiss="modal" class="close" type="button">&times;</button>
                      <h4 class="modal-title"><?php echo $ver_cpanel_sub_menu['titulo']; ?> | Registro de vehiculos</h4>
                  </div>
				  <div class="panel-heading">
                      <p><?php echo $ver_cpanel_sub_menu['descripcion']; ?>.</p>
                  </div>
                  <div class="modal-body">
				  <!-- CONTROL DEL FORMULARIO -->
				  <form action="<?php echo $url_global.'&proceso=1NS3RT_vehiculos'?>" method="POST" class="form-bordered" name='formulario'>

                                                <div class="col-sm-4">
													<input	class='form-control'
															type='text' 
															name='placa' 
															id='placa'
															autocomplete="off"
															autofocus="autofocus"
															required="required"
															title='Campo requerido, no dejar en blanco'
															value=''
															pattern="[A-Za-z0-9]{4,8}"
															placeholder='Placa del vehiculo'
															onChange="javascript:this.value=this.value.toUpperCase();"
													/>
												</div>
												<div class="col-sm-4">
													<input	class='form-control '
															type='number' 
															name='cedula_chofer' 
															id='cedula_chofer'
															autocomplete="off"
															autofocus="autofocus"
															required="required"
															title='Campo requerido, no dejar en blanco'
															value=''
															min="999"
															placeholder='Cedula del chofer'
													/>
												</div>
												<div class="col-sm-4">													
													<input	class='form-control' 
															type='text' 
															name='nombre_chofer' 
															id='nombre_chofer'
															autocomplete="off"
															autofocus="autofocus"
															required="required"
															title='Campo requerido, no dejar en blanco'
															value=''
															placeholder='Nombre del chofer'
															onChange="javascript:this.value=this.value.toUpperCase();"
													/>
							                    </div>	
												<div class="col-sm-4">													
													<input	class='form-control' 
															type='text' 
															name='descripcion_vehiculo' 
															id='descripcion_vehiculo'
															autocomplete="off"
															autofocus="autofocus"
															required="required"
															title='Campo requerido, no dejar en blanco'
															value=''
															placeholder='Descripcion de vehiculo'
															onChange="javascript:this.value=this.value.toUpperCase();"

													/>
							                    </div>
                              					<div class="col-sm-4">
												      <select id="select-search-hide"  name='cat_vehiculos'  class='form-control' required="required">
														<option value='' >CATEGORIA DE VEHICULOS</option>
													<?php	$consulta_rubro_x1=mysql_query("select * from tabla_vehiculos_cat_xls where eliminar=0",$link);
															while($ver_consulta_rubro_x1=mysql_fetch_array($consulta_rubro_x1)){ 
													?>
															<option value="<?php echo $ver_consulta_rubro_x1['id']; ?>"><?php echo $ver_consulta_rubro_x1['nombre']; ?></option>
													<?php  } ?>
													</select>
												</div>												
												<br>
												<br>
												<br>
										<div class="pull-right">
											<button type="submit" name="submit" value='Guardar' class="btn btn-success btn-sm">GUARDAR <i class="fa fa-floppy-o ml5"></i></button>
										</div>
							</form>  
				  
				  <!-- CONTROL DEL FORMULARIO -->
				  			<br>
				  			<br>
				  			
<table  class="table table-striped table-bordered responsive">
                                <thead class="">
                                    <tr>
                                        <th>Placa</th>
                                        <th>Cedula del chofer</th>
                                        <th>Nombre del chofer</th>
                                        <th>Descripcion</th>
                                        <th>Opcion</th>
                                    </tr>
                                </thead>
                                <tbody>	
								<?php
									$consultar_sql_verxs=mysql_query("select * from   tabla_vehiculos_xls where eliminar='0' ORDER BY id DESC  LIMIT 20 ",$link);
									while($ver_consultar_sql_ver_xx1=mysql_fetch_array($consultar_sql_verxs)){
										?>								
									<tr>
											<td><?php echo $ver_consultar_sql_ver_xx1['placa']; ?></td>		
											<td><?php echo $ver_consultar_sql_ver_xx1['cedula_chofer']; ?></td>		
											<td><?php echo $ver_consultar_sql_ver_xx1['nombre_chofer']; ?></td>		
											<td><?php echo $ver_consultar_sql_ver_xx1['descripcion_vehiculo']; ?></td>		
											<td>
												<a href="<?php echo $url_global;?>&proceso=D3L3T3&token=<?php echo $ver_consultar_sql_ver_xx1['id']; ?>"   title="Eliminar"  class=" btn-danger btn-sm" ><i class="fa fa-trash-o"></i></a>
											</td>
									</tr>
								<?php } ?>
                                </tbody>			  
                               </table>							
							
							
							
												<br>
												<br>
				  </div>
              </div>
            </div>
        </div>  
		
		
  <div class="modal fade bs-example-modal-lg-pesov" tabindex="-1" role="dialog">
            <div class="modal-dialog modal-lg">
              <div class="modal-content">
                  <div class="modal-header">
                      <button aria-hidden="true" data-dismiss="modal" class="close" type="button">&times;</button>
                      <h4 class="modal-title"><?php echo $ver_cpanel_sub_menu['titulo']; ?> | Pesos de vehiculos de entrada <?php echo $fecha_actualxls; ?></h4>
                  </div>
				  <div class="panel-heading">
                      <p><?php echo $ver_cpanel_sub_menu['descripcion']; ?>.</p>
                  </div>
                  <div class="modal-body">
				  <!-- CONTROL DEL FORMULARIO -->
				  <form action="<?php echo $url_global.'&proceso=1NS3RT_vehiculos_peso_inicial'?>" method="POST" class="form-bordered" name='formulario'>

                                               
                              					<div class="col-sm-12 ">
												      <select id="select-search-hide"  name='cod_vehiculo'  class='form-control' required="required">
														<option value='' >VEHICULOS REGISTRADOS</option>
													<?php	$consulta_rubro_x1=mysql_query("select * from  tabla_vehiculos_xls where eliminar=0  ORDER BY placa ASC",$link);
															while($ver_consulta_rubro_x1=mysql_fetch_array($consulta_rubro_x1)){ 
													?>
															<option value="<?php echo $ver_consulta_rubro_x1['id']; ?>"><?php echo $ver_consulta_rubro_x1['placa']; ?> - <?php echo $ver_consulta_rubro_x1['descripcion_vehiculo']; ?> - <?php echo $ver_consulta_rubro_x1['nombre_chofer']; ?></option>
													<?php  } ?>
													</select>
												</div><br><br><br>
												<div class="col-sm-12 has-error">
													<input	class="form-control Fieldss"
															type='number' 
															name='peso_inicial' 
															id='peso_inicial'
															autocomplete="off"
															autofocus="autofocus"
															required="required"
															title='Campo requerido, no dejar en blanco'
															value=''
															min="999"
															step="any"
															placeholder='P. de entrada'
													/>
												</div>	
																								
												<br>
												<br>
												<br>	<br>
												<br>
												<br>
										<div class="pull-right">
											<button type="submit" name="submit" value='Guardar' class="btn btn-primary btn-sm">GUARDAR <i class="fa fa-floppy-o ml5"></i></button>
										</div>
							</form>  
				  
				  <!-- CONTROL DEL FORMULARIO -->
				  			<br>
				  			<br>
				  			
<table  class="table table-striped table-bordered responsive">
                                <thead class="">
                                    <tr>
                                        <th>Fecha de entrada</th>
                                        <th>Vehiculo</th>
                                        <th>Peso de entrada</th>
                                        <th>Opcion</th>
                                    </tr>
                                </thead>
                                <tbody>	
								<?php
									$pconsultar_sql_verxs=mysql_query("select * from   tabla_vehiculos_peso_xls where eliminar='0' and fecha='$fecha_actualxls' ORDER BY id DESC  LIMIT 30 ",$link);
									while($ver_consultar_sql_ver_xx1p=mysql_fetch_array($pconsultar_sql_verxs)){
										$vehiculo=$ver_consultar_sql_ver_xx1p['cod_vehiculo'];
										$consultar_sql_verxs=mysql_query("select * from   tabla_vehiculos_xls where id='".$vehiculo."' and eliminar='0'  ",$link);
										$ver_consultar_sql_ver_xx1=mysql_fetch_array($consultar_sql_verxs);
										?>								
									<tr>
											<td><?php echo $ver_consultar_sql_ver_xx1p['fecha']; ?> - <?php echo $ver_consultar_sql_ver_xx1p['hora_inicial']; ?></td>		
											<td><?php echo $ver_consultar_sql_ver_xx1['placa']; ?> -  <?php echo $ver_consultar_sql_ver_xx1['nombre_chofer']; ?> - <?php echo $ver_consultar_sql_ver_xx1['descripcion_vehiculo']; ?></td>		
											<td><?php echo number_format($ver_consultar_sql_ver_xx1p['peso_inicial'], 2, ',',''); ?> Kg. </td>		
											<td>
												<a href="<?php echo $url_global;?>&proceso=D3L3T3_peso_v&token=<?php echo $ver_consultar_sql_ver_xx1p['id']; ?>"   title="Eliminar"  class=" btn-danger btn-sm" ><i class="fa fa-trash-o"></i></a>
											</td>
									</tr>
								<?php } ?>
                                </tbody>			  
                               </table>							
							
							
							
												<br>
												<br>
				  </div>
              </div>
            </div>
        </div>
		





<!--MODAL -->		

<div class="modal fade bs-example-modal-lg-pesosalida" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
			<div class="modal-header">
                <button aria-hidden="true" data-dismiss="modal" class="close" type="button">&times;</button>
                    <h4 class="modal-title"><?php echo $ver_cpanel_sub_menu['titulo']; ?> | Pesos de vehiculos de salida <?php echo $fecha_actualxls; ?></h4>
            </div>
        <div class="modal-body">
			<form action="<?php echo $url_global.'&proceso=PROCESO_PESAR_SALIDA'?>" method="POST" class="form-bordered" name='formulario'>
					<input type="hidden" id="n_factura" name="n_factura" value="<?php echo $n_factura; ?>" />
					<input type="hidden" id="origen" name="origen" value="<?php echo $origen; ?>" />		
					<input type="hidden" id="id_control" name="id_control" value="<?php echo $id_control; ?>" />		
					<div class="col-sm-12">
						<select id="select-search-hide"  name='cod_vehiculo'  class='form-control' required="required">
							<option value='' >VEHICULOS CON PESO INICIAL DEL DIA DE HOY</option>
								<?php	$consulta_rubro_x1=mysql_query("select * from  tabla_vehiculos_peso_xls where eliminar=0  and fecha='$fecha_actualxls' and estatus='0'",$link);
										while($ver_consulta_rubro_x1=mysql_fetch_array($consulta_rubro_x1)){ 
											$vehiculo=$ver_consulta_rubro_x1['cod_vehiculo'];
											$consultar_sql_verxs=mysql_query("select * from   tabla_vehiculos_xls where id='".$vehiculo."' and eliminar='0'  ",$link);
											$ver_consultar_sql_ver_xx1=mysql_fetch_array($consultar_sql_verxs);
								?>
							<option value="<?php echo $ver_consulta_rubro_x1['id']; ?>"><?php echo $ver_consultar_sql_ver_xx1['placa']; ?> - <?php echo $ver_consultar_sql_ver_xx1['descripcion_vehiculo']; ?> - <?php echo $ver_consultar_sql_ver_xx1['nombre_chofer']; ?></option>
							<?php  } ?>
						</select>
					</div>
					<div class="col-sm-12">
						<input 	type="number" 
								class="Fields form-control input-lg" 
								min="999"
								step="any"
								placeholder='P. de salida'
						/> 
					</div>
					  <div class="pull-right">
						<button type="submit" name="submit"  class="btn btn-primary">PROCESAR</button>
					 </div>
			</form>				 
		</div>
		</div>
    </div>
</div>