<? 
 
$booking = str_replace('\"','"',$booking);
$booking = str_replace("\'","'",$booking);
$txtbooking=$booking;

include("../comun/conexion3.php");
include("../comun/conex_ver.php");
include("../comun/funciones.php");

$link_impo=con_impo();
$txtidbooking= qry_($link_impo,'booking_interteam = "'.$txtbooking.'"','bookingexpint','booking'); //itver
$txthbl = hbl_($link_impo,$txtidbooking);
// datos de pol, pod, vessel...
$q1=data($link_impo,"select * from bookingexpint where booking_interteam like '$txtbooking%'");
$q=data($link_impo,"select * from datosexpint where files = '".$q1[files]."'");
$FREIGHT = data($link_impo,"SELECT * FROM hblexpint where files='".$q1[files]."' and hbl like '$txthbl'");
$freightpayable= $FREIGHT['freightpayable']; 
if ($freightpayable=="ORIGIN")
$freightcode="FREIGHT PREPAID";
else
$freightcode="FREIGHT COLLECT";
// datos del contenedor
$container = data($link_impo,"SELECT * FROM containerdetailexpint where files like '" . $q1[files] . "%'"); 
$container_=$container["containerno"];
$containerseal=$container["containerseal"];
$containertype=$container["type"];
$txtblmaster_ams=$container["blmaster_ams"];


$link_ver=con_ver();
$datos = data($link_ver,"select * from detailcargaexpint where bookingno like '$txtidbooking%'");

?>
<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">
                MANIFIESTO
                </span>
                <br />
                <span style="text-align:center;font-size: 16px; 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 align="left" style="text-align: left;    width: 50%"></td>
                <td style="text-align: left;    width: 50%"></td>
                <td style="text-align: right;    width: 50%">PAGE [[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/logolpv.jpg" /><img src="<?="https://".$_SERVER["SERVER_NAME"]?>/ATM/images/logo-aduana.jpg" /></span> </div>
 <br />  
 <div align="right"><span style="text-align: right;    width: 15%">Altamira, Tamaulipas a <?php echo date('d').'/'.mesador(date('m')).'/'.date('Y'); ?></span></div>
 
 <br /><br />
 <table style="width: 100%;border: solid 1px #5544DD;border-collapse:collapse;" align="left" >
     
    <tr>
        <td  style="text-align: left; border: solid 1px #55DD44;">
          <div style="width:370px">
            <b>SHIPPER</B><br />
            <? echo $datos["shipper"].'<br>'.$datos["shipper2"].'<br>'.$datos["shipper3"].'<br>'.$datos["shipper4"].'<br>'.$datos["shipper5"].'<br>'.$datos["shipper6"];
	 ?>
       
          </div>
        </td>
        <td   style="text-align: left; border: solid 1px #55DD44;">
          <div style="width:350px">
            <b>BOOKING:</b><?=$txtbooking?><BR /><BR />
            <b>EXPORT REFERENCE:</b><BR />
          </div>
        </td>
    </tr>
    
      <tr>
        <td  style="text-align: left; border: solid 1px #55DD44;">
          <div style="width:370px">
          <b>CONSIGNEE</b><br />
          <? echo $datos["consignee"].'<br>'.$datos["consignee2"].'<br>'.$datos["consignee3"].'<br>'.$datos["consignee4"].'<br>'.$datos["consignee5"].'<br>'.$datos["consignee6"];
	 ?>
     	  </div>
        </td>
        <td  style="text-align: left; border: solid 1px #55DD44;"> <div style="width:350px"><b>FORWARDING AGENT:<br />
          <br />
          LOGISTICA PORTUARIA DE ALTAMIRA, S.A. DE C.V.<br />
          INDEPENDENCIA NO. 762 1ER PISO COL. CENTRO<br />
          ALTAMIRA, TAMAULIPAS&nbsp;&nbsp;AT'N: ANA CECILIA SANCHEZ A. TEL: 932-41-11</b>
          </div>
        </td>
      </tr>
      <tr>
        <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:370px">
        <b>NOTIFY</b><br />
        <? echo ''.$datos["notify"].'<br>'.$datos["notify2"].'<br>'.$datos["notify3"].'<br>'.$datos["notify4"].'<br>'.$datos["notify5"].'<br>'.$datos["notify6"];
	 ?>
        </div>
        </td>
        <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:350px"></div>
        </td>
      </tr>
      <tr>
        <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:370px">
                <b>PORT OF LOADING</b><br />
                <? echo $q[pol].', '.$q[pol_country]?><BR /><BR />
                <b>PORT OF DISCHARGE</b><br />
                <? echo $q[pod].', '.$q[pod_country];?>
        </div>
        </td>
        <td  style="text-align: left; border: solid 1px #55DD44;">
        <div style="width:350px">
                <b>OCEAN VESSEL</b><br />
                <? echo $q[vessel];
             ?><BR /><BR />
             <b>FINAL DESTINATION</b><br />
                <? echo $q[finaldestination];
             ?>
             
        </div>
        </td>
      </tr>
     
     
    </table>
    

    
 


<table style="width: 100%; border: solid 1px #5544DD;border-collapse:collapse;" align="left" ><!---714-->
   <tr>
    <td  colspan="4" style="text-align: left; border: solid 1px #55DD44;">
    <div style="width:714px">
    <B>CONTENEDOR:</B> &nbsp;<?=$container_?><br />
    <b>SELLO: </B> &nbsp;<?=$containerseal?><br />
    <b>TARA:</b><br />
    <b>PESO CON TARA:
    </B> </div>
    </td>
  </tr>
  <tr>
    <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:130px"><B>MARKS AND NOS</B></div></td>
    <td   style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:310px"><B>DESCRIPTION</B></div> </td>
    <td  style="text-align: left; border: solid 1px #55DD44;background:#CCFFCC"><div style="width:130px"><B>NET WEIGHT KGS</B> </div></td>
    <td bgcolor="#CCFFCC"  style="text-align: left; border: solid 1px #55DD44;"><div style="width:144px"><B>MEASUREMENT CBM</B> </div></td>
  </tr>
  
  <tr>
    <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:130px"><?=$datos[markandnos]?><br /> </div></td>
    <td   style="text-align: left; border: solid 1px #55DD44;"><div style="width:310px"><?=$datos[cargo]?></div> </td>
    <td  style="text-align: left; border: solid 1px #55DD44;"><div style="width:130px"><?=$datos[netweight]?></div></td>
    <td   style="text-align: left; border: solid 1px #55DD44;"><div style="width:144px"><?=$datos[measurement]?></div></td>
  </tr>
  
</table>

<table style="width: 100%;" align="left" ><!---714-->
  <tr>
  	<td  style="text-align: left;">
    <div style="width:724px"><BR /><BR />
    <B>TOTAL OF BULKS:</B>&nbsp;<?=$datos[bulk]?><b>&nbsp;&nbsp;&nbsp;&nbsp;TOTAL WEIGHT:</b>&nbsp;&nbsp;&nbsp;&nbsp;<?=$datos[netweight]?>&nbsp;&nbsp;&nbsp;&nbsp;<b>TOTAL MEASUREMENT:</b>&nbsp;<?=$datos[measurement]?>
    <BR /><BR />
    </div>
    </td>
 
  </tr>
 </table>
 
 <table style="width: 100%;" align="left" >
  <tr>
  	 <td  style="text-align: left; "><div style="width:724px"><B>FREIGHT PREPAID</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>CLEAN ON BOARD</B></div></td>
  </tr>
 </table>
</page>
 
  <? include("../pie_subnivel1.php");?>