<? session_start();
include("../comun/conexion3.php");
include("../comun/conex_ver.php");
include("../comun/funciones.php");
$link_impo=con_impo();$link=con_ver();
$referencia = $_GET[referencia]; 
$referencia = str_replace("\'","'",$referencia);
$referencia_cliente = $_GET[referencia_cliente]; 
$referencia_cliente = str_replace("\'","'",$referencia_cliente);
// echo 'referencia cliente 0.'.$referencia_cliente;
		con_impo();
		$q1=data($link_impo,"select files from datosexpint where referencia_interteam = '".$referencia_cliente."' or referencia_interteam = '".$referencia."'");
		$q=data($link_impo,"select * from datosexpint where files like '%".$q1[files]."%' ");
		
		$viaje = $q[voyage];
		$buque = $q[vessel];
		$destinofinal = $q["finaldestination"];
		$pod = $q[pod].', '.$q[pod_country];
		$naviera = $q[shippingline];
		
		$container = data($link_impo,"SELECT * FROM containerdetailexpint where files like '" . $q1[files] . "%'"); 
		
		$container_= $container["containerno"]!='' ? $container["containerno"] : '-';
		$containerseal = $container["containerseal"]!='' ? $container["containerseal"] : '-';
		$containertype = $container["type"]!='' ? $container["type"] : '-';
		$bookingssl = $container["bookingssl"]!='' ? $container["bookingssl"] : '-';
		
		$txtblmaster_ams = $container["blmaster_ams"];
		// articulo 10 
		con_ver();
		
		$datos10 = data($link,"select * from articulo10 where referencia_veracruz='$referencia' and referencia_cliente='$referencia_cliente'");
		$tara=$datos10['tara'];
		$peso_neto_con_tara=$datos10['peso_neto_con_tara'];
		$peso_neto= $datos10['peso_neto'];
		$linea=$datos10['linea'];
		$tipos_de_carga = $datos10['tipos_de_carga'];
		$tipos_de_imo = $datos10['tipos_de_imo'];
		
		// cuenta de gastos
		$gastos = data($link,"select * from gastos where referencia_veracruz='$referencia' and referencia_cliente='$referencia_cliente'");
		$patio=$gastos['patio'];
		$liberacion=$gastos['liberacion'];
		$fumigacion = $gastos['fumigacion'];
		$terrestre = $gastos['terrestre'];
		$golmex = $gastos['golmex'];
		$total =  number_format($patio+$liberacion+$fumigacion+$terrestre+$golmex,2);
?>
<page backtop="5mm" backbottom="10mm" backleft="10mm" backright="10mm">
    <page_header>
<table style="width: 100%; ">
            <tr>
                <td style="text-align: left;    width: 15%">&nbsp;</td>
                <td style="text-align: center;    width: 70%"><span style="text-align:center;font-size: 20px; font-weight: bold">LOGISTICA PORTUARIA DE ALTAMIRA, S.A. DE C.V.</span>
                
</td>
                <td style="text-align: right;    width: 15%">&nbsp;</td>
            </tr>
      </table>
    </page_header>
    <page_footer>
<table style="width: 100%; border: solid 1px black;">
            <tr> 
 <td width="41%" align="left" style="text-align: left;    width: 50%; ">
        <span style="font-size:9px">IGNACIO ALLENDE 308 SUR - COL. AMPLIACION DE LA UNIDAD NACIONAL <BR />
CP 89510, CIUDAD MADERO, TAMAULIPAS </span>

        </td>
                <td width="31%" style="text-align: center;    width: 45%;font-size:9px">TEL : (833) 2103040 <BR /> (833) 2103046 / (833) 2159217</td>
                <td width="28%" style="text-align: right;    width: 25%">P&Aacute;GINA [[page_cu]]/[[page_nb]]</td>
            </tr>
      </table>
    </page_footer>
 <br /> 
 <div align="center"><span style="text-align: left;    width: 30%"><img src="<?="https://".$_SERVER["SERVER_NAME"]?>/ATM/images/logo_lpv.jpg" />
 <!--<img src="<? //="https://".$_SERVER["SERVER_NAME"]?>/ATM/images/logo-aduana.jpg" />-->
 
 </span> </div>
 <br />  
 
 
 <div align="justify" style="text-align:center;width:100%; max-width:100%; font-size:14px"> 
 <b>CUENTA DE GASTOS DE EXPORTACION</b>
 </div>
 <br />
 <br />
 
 <div style="width:100%; max-width:100%; text-align:center">
 Ciudad Madero, Tamaulipas a <?php echo date('d').'/'.mesador(date('m')).'/'.date('Y'); ?>
 </div>
 <br />
 <br />
 <table style="width: 100%; border: solid 1px #5544DD;border-collapse:collapse; font-size:10px" align="CENTER" >
   <tr>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:103px;max-width:103px"><b>CONTENEDOR</b></div></td>
     <td   style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:40px;max-width:40px"><b>MED</b></div></td>
     <td   style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:40px; max-width:40px"><b>TIPO</b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:105px;max-width:105px"><b>SELLOS</b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:60px;max-width:60px"><b>PATIO</b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:60px;max-width:60px"><b>TERRESTRE</b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:70px;max-width:70px"><b>FUMIGACION</b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:70px;max-width:70px"><b>LIBERACION</b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:50px;max-width:50px"><b>GOLMEX</b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:40px;max-width:40px"><b>TOTAL</b></div></td>
   </tr>
   <tr>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:103px;max-width:103px">
       <?=$container_?>
     </div></td>
     <td   style="text-align: left; border: solid 1px #55DD44;"><div style="width:40px;max-width:40px"><b></b></div></td>
     <td   style="text-align: left; border: solid 1px #55DD44;"><div style="width:40px; max-width:40px"><b>
       <?=$containertype?>
     </b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:105px;max-width:105px"><b>
       <?=$containerseal?>
     </b></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:60px;max-width:60px"><?=number_format($patio,2)?></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:60px;max-width:60px"><?=$terrestre!='' ? number_format($terrestre,2) : ''?></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:70px;max-width:70px"><?=number_format($fumigacion,2)?></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:70px;max-width:70px"><?=number_format($liberacion,2)?></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:50px;max-width:50px"><?=number_format($golmex,2)?></div></td>
     <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:40px;max-width:40px"><b><?=$total?></b></div></td>
   </tr>
 </table>
 <br />
<br />
   
   <br />
   <br />
 <table align="left" width="100%" style="border: solid 1px #5544DD;border-collapse:collapse;" >
     
<tr>
<td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC""><div style="width:100px; text-align:center"><strong>BOOKING</strong></div></td>
<td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC""><div style="width:100px; text-align:center"><strong>BUQUE</strong></div></td>
        <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC""><div style="width:200PX; text-align:center"><strong>PUERTO DE DESCARGA</strong></div></td>
        <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC""><div style="width:198px;text-align:center"><strong>DESTINO FINAL</strong></div></td>
        <td   style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC""><div style="width:100px;text-align:center"><strong>NO DE VIAJE</strong></div></td>
    </tr>
  
      <tr>
        <td  style="text-align: left; border: solid 1px #55DD44;">
		<div style="width:100px; text-align:center">
		<?=$bookingssl?>
        </div>
        </td>
        <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:100px; text-align:center"><? echo $buque;
             ?></div>  
        </td>
        <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:200px; text-align:center"><? echo $pod;?></div>  
        </td>
             <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:198px; text-align:center"><? echo $destinofinal;?></div>  
        </td>
             <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:100px; text-align:center"><? echo $viaje;?></div>  
        </td>
      </tr>
     
     
    </table>
    
    <br />
    <br />
  <br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<div style="width:100%; max-width:100%; text-align:center"> 
      <B>RECIBI JUEGO ORIGINAL  <br />
      ANA ROSA HERNANDEZ RAMOS
      </B>
</div> 
 
</page>
 
