<!DOCTYPE html>
<html>
<head>
    <title>Delivery Advice</title>
	<style type="text/css">
	.tablel{
	  border:1px solid #fff !important;
	  border-collapse: collapse !important;
	}
  .table td {
        border: 1px solid #1f67b2; 
    }
	.whole {
	margin:10px;
	padding:5px;
	.table {
	border-collapse: collapse !important;
	font-size: 12px;
	color: #101010;
	width: 100%;
}
.table thead th{
	background: #e1b7ff;
	color: #000;
}
.table th,
.table td {
	border: 1px solid #000;
	text-align: left;
	padding: 3px 6px;
}
.table th.text-left,
.table td.text-left{
	text-align: left;
	text-align: left !important;
}
.table th.text-right,
.table td.text-right{
	text-align: right;
	text-align: right !important;
}
.table th.text-center,
.table td.text-center{
	text-align: center;
	text-align: center !important;
}
.table tbody tr:nth-child(even){
	background: #fff;
}
.table th.Table-Title,
.table td.Table-Title{
    padding:7px 6px !important;
    font-size:1.15rem;
    color:green;
    font-weight:500;
    text-transform:uppercase;
}
.table th.total,
.table td.total{
	background: #e1b7ff;
	color: #fff;
	font-size: 11px;
}
	}
	.input[type="checkbox"]{
  width: 50px !important;
  height: 50px !important;
}
}
</style>
</head>
<body>
 <div style="padding-top:500px !important;">
<?php
				$transfer = Transfers::model()->findByPk($id);
				$invoices = explode(',', $transfer->delivery_notes);
				$invoice  = $invoices[0];
				$invoiceModel = OutboundInvoice::model()->findBypk( $invoice );
    ?>
    <br><br><br><br><br>
    <div class="col-6 text-left">
	   <p>Date: <?php echo date('d-m-Y', strtotime($transfer->date)) ?></p>
	</div>
	<div class="col-6 text-left">
	   <p>D.A.NO.F/Z No.<?php echo '1842-'.date('m', strtotime($transfer->date)).'-'.date('y', strtotime($transfer->date)).'-'.$id ?></p>
	</div>
	<div class="col-6 text-left">
	   <p>The Director,</p>
	   <p>Dept.of Ports & Customs</p>
	</div>
	<div class="col-6 text-left" style="margin-top:15px;">
	   <table  class="table "border="1" style="100%;">
	      <tr>
		    <th>Importer Code</th>
			<th>Free Zone Code</th>
			<th>Rep.Card No</th>
		  </tr>
		  <tr>
		    <td></td>
			<td>F-1842<br>&nbsp;</td>
			<td></td>
		  </tr>
	   </table>
	</div>
	<p>Please authorize release of below mentioned goods to M/s 
	<?php
	echo ($invoiceModel->consignee_name!='') ? $invoiceModel->consignee_name : $invoiceModel->customer->name;
	echo ($invoiceModel->consignee_address!="") ? ' '.$invoiceModel->consignee_address : ' '.$invoiceModel->customer->billing_adds;
	 //echo $invoiceModel->customer->name.' '.$invoiceModel->customer->billing_adds ?>
	 for Export , to <?php echo $invoiceModel->destination; ?></p>
	<div class="col-12">
	   <table class="table" style="width:100%;">
	      <thead>
		      <tr>
			     <th>Marks & Numbers</th>
				 <th>Type</th>
				 <th>Quantity</th>
				 <th>Weight<br>Kgs/M.T.</th>
				 <th>Volume<br>CBM</th>
				 <th colspan="2">Description of Goods</th>
			  </tr>
		  </thead>
		  <tbody>
		      <tr>
			     <td>
						 <?php 
						 		if( $invoiceModel->mode_of_transport == 2 ){ //Sea
									echo 'Yamaha<br><br>';
									//echo $transfer->all_containers();
								}else{
									echo 'Yamaha';
								}
						 ?>
					 </td>
				 <td>CTNS</td>
				 <td class="text-right"> <?php echo $transfer->Total_cartons; ?></td>
				 <td style="text-align: right;"><?php echo number_format($transfer->Total_weight, 2, '.', ''); ?><br>KGS</td>
				 <td style="text-align: right;"><?php echo number_format($transfer->Total_volume, 3, '.', ''); ?></td>
				 <td rowspan="3" colspan="2"><?php echo $transfer->Total_cartons; ?> CTNS( STC <?php echo $transfer->Total_quantity; ?>PCS) OF YAMAHA <br>PRODUCTS AS PER INV NO. <?php echo $transfer->generate_invoice(); ?><br><br><?php echo $transfer->all_containers_with_count(); ?></td>
			  </tr>
			  <tr>
			    <td colspan="5"><b>Payment Method</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Mark where appropriate</b></td>
			  </tr>
			  <tr>
			    <td colspan="5">
			    <table style="width:100%;">
                                <tr> 
                                   <td style="width:150px;border:none;"><input type="checkbox" name="first" value="Box">&nbsp;CDR Cash</td>
                                
                                 <td style="width:150px;border:none;"><input type="checkbox" name="second" value="Box1">&nbsp;CRD Bank</td>
                                <td style="width:80px;border:none;"> <input class="text-right" type="checkbox" name="third" value="Box3">&nbsp;Deposit</td>
				
                                   </tr>
                                    <tr>
                                <td style="border:none;"><input type="checkbox" name="first" value="Box">&nbsp;Credit A/C*</td>
                                 
                                   

                                  <td style="border:none;"><input type="checkbox" name="second" value="Box1">&nbsp;Stan.G*</td>

                                <td style="border:none;" style"border:none;"> <input type="checkbox" name="third" value="Box3">&nbsp;Bank G*</td></tr>
				 <tr><td style="border:none;"><input type="checkbox" name="first" value="Box">&nbsp;FTT</td>
 
                                         
                              <td style="border:none;"><input type="checkbox" name="second" value="Box1">&nbsp;Alcohol</td> 



                               <td style="border:none;"> <input type="checkbox" name="third" value="Box3">&nbsp;Others</td></tr></table>
				</td>
			  </tr>
			  <tr>
			    <td>Ref.A/C No.*</td>
				<td colspan="4"></td>
				<td>Exit Point</td>
				<td>Destination</td>
			  </tr>
			  <tr>
			    <td><br>&nbsp;</td>
				<td colspan="4"><br>&nbsp;</td>
				<td><?php echo $transfer->from_port; ?><br>&nbsp;</td>
				<td><?php echo $transfer->to_port; ?><br>&nbsp;</td>
			  </tr>
			  <tr>
			    <td colspan="5" rowspan="4"><p><b><u>B/E Ref.Nos:</u></b></p><br><br>
				<p>AS PER ATTACHMENT</p><br><br><br><br>
				</td>
				<td colspan="2">Carrier's Agent</td>
			  </tr>
			  <tr>
			    <td colspan="2"><br>&nbsp;</td>
			  </tr>
			  <tr>
			    <td>Country of Origin</td>
				<td>Value</td>
			  </tr>
			  <tr>
			     <td><?php echo $transfer->country_origins_labels_comma(); ?></td>
				<td class="text-right"><?php echo $invoiceModel->currency; ?>&nbsp;&nbsp;&nbsp;<b>
				<?php echo Yii::app()->numberFormatter->formatCurrency($transfer->Total_value,"")
				 //echo number_format($transfer->Total_value, 3, '.', '') ?></b><br><br><br></td>
			  </tr>
			  <tr>
			     <td colspan="5">Customs Bill Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark where appropriate</td>
			     <td rowspan="2" colspan="2">I/We declare the details given here in to be true and complete.<br><br><br><br><br>Licensee/Agent Stamp & Signature</td>
			  </tr>
			  <tr>
			    <td colspan="5">
				<p><input type="checkbox" name="first" value="Box">&nbsp;Import</p>
                                <p><input type="checkbox" name="third" value="Box3">&nbsp;Import Re-export</p>
				<p><input type="checkbox" name="first" value="Box">&nbsp;Temporary Exit</p>
				<p><input type="checkbox" name="first" <?php echo $transfer->transfer_ownership == 0 ? 'checked="checked"' : ''; ?>  value="Box">&nbsp;Export</p>
				<p><input type="checkbox" name="first" <?php echo $transfer->transfer_ownership == 1 ? 'checked="checked"' : ''; ?> value="Box">&nbsp;Free Zone Internal Transfer</p>
				</td>
			  </tr>
			  <tr>
			     <td>For Customs Use<br>&nbsp;<br>&nbsp;<br>&nbsp;<br>&nbsp;<br>&nbsp;<br>&nbsp;</td>
				 <td colspan="4">&nbsp;<br><br><br><br></td>
				 <td colspan="2">I/We decalre the details given here in to be true and complete.<br><br><br><br><br>Importer's Stamp & Signature*<br>*Applicable only incase of Imports.</td>
			  </tr>
		  </tbody>
	   </table>
	</div>
  


    <htmlpagefooter name="myfooter" class="newfoot">

<!--<div style="text-align:center;width:100%;font-size:10px;">Generated from Bluesky Logistics
<?php
      //date_default_timezone_set("Asia/Dubai");
     //echo date('d/m/Y')." ".date("h:i:s A"); ?>
</div>-->


<!--<div style="border-top: 1px dotted #000000; font-size: 12px; text-align: center; padding-top: 10px; background-color: #e1b7ff;">
<?php if($logo_display>0){?>
<div style="text-align:center;width:100%">
    <b><?php echo $company_name; ?></b><br>
    <?php echo $company_address; ?>
</div>
<?php } ?>
<div style="text-align:center;width:100%">Page {PAGENO} of {nb} </div>
</div>--></div>
</htmlpagefooter>


    <style type="text/css">
   div { 
    page-break-inside:avoid;

      }


</style>

</body>

</html>
