<?php $this->load->view("common/header"); ?>
<div style="top:5px;" class="panel-tools open">
  <button data-toggle="dropdown" class="btn btn-blue dropdown-toggle" onClick="window.print()"><i class="fa fa-print"></i></button>
</div>
<style type="text/css">
th {
	text-align: left !important;
}
.report_view_th {
	color: #000 !important;
	text-align: center !important;
}
body {
	background-color: #fff !important;
	font-size: 12px;
}
p {
	margin: 0;
}
.modal-body {
	padding: 2px 15px 15px;
	position: relative;
}
body .modal {
	/* new custom width */

	width: 750px;
	/* must be half of the width, minus scrollbar on the left (30px) */

	margin-left: -375px;
}
.print-table td, th {
	padding: 1px;
	vertical-align: top !important;
}
thead {
	display: table-header-group;
}
tfoot {
	display: table-footer-group;
}
.width_cus {
	width: 100px !important;
}
.width_qty {
	width: 100px !important;
}
</style>

<!--https://css-tricks.com/almanac/properties/p/page-break/-->

<!--onLoad="window.print()-->

<body onLoad="window.print()">
<?php //echo "<pre>";print_r($list); echo "</pre>"; ?>
<div class="row">
  <div class="col-xs-12"> 
    <!-- <h3 class="center" style="font-family:'Times New Roman', Times, serif; margin-bottom:3px; letter-spacing:2px;"></h3>--> 
    
    <!-- <p class="center">

 	 <?php echo$wharehose_details['address'] ?></p>--> 
    
    <!-- <p class="center">

	<?php echo $wharehose_details['phone'];?></p>

    <p class="center">

	<?php echo $wharehose_details['email'];?></p>-->
    
    <h5 class="center" style="font-family:'Times New Roman', Times, serif; margin-bottom:3px; letter-spacing:2px;">Loading Sheet</h5>
    <div class="col-xs-6">
      <p>Date -
        <?php
	  
	  $date=date_create($delivary_details['loading_date']);echo date_format($date,"Y-m-d"); 
	  
	  ?>
      </p>
      <p> Area - <?php echo $delivary_details['area_name']?></p>
      <p> Vehicle - <?php echo $delivary_details['vehicle_code']?> </p>
      <p> Driver - <?php echo $delivary_details['user_first_name']?></p>
      <br>
    </div>
    <div class="col-xs-6 pull-right" style="padding-left:160px;"> </div>
  </div>
</div>
<div class="print-start">
  <table class="print-table" width="100%" style="border:1px solid #000; text-align:left">
    <thead>
      <tr>
        <th style="border:1px solid #000;"	class="col-md-1"> PRODUCT CODE</th>
        <th style="border:1px solid #000;"	class="col-md-3"> PRODUCT NAME</th>
        <th style="border:1px solid #000;"	class="col-md-1"> QTY</th>
        <th style="border:1px solid #000; padding:0px;"	class="col-md-3" > <table style="width: 100%">
            <tr>
              <td class="col-xs-4" colspan="3" style="border: solid 1px;border: solid 1px; text-align:center">LOADING</td>
            </tr>
            <tr>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center">WH A</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center">WH B</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center">WH C</td>
            </tr>
          </table>
        </th>
        <th style="border:1px solid #000;padding:0px;"	class="col-md-3"> <table style="width: 100%">
            <tr>
              <td class="col-xs-4" colspan="3" style="border: solid 1px;border: solid 1px; text-align:center;">UNLOADING</td>
            </tr>
            <tr>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center">WH A</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center">WH B</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center">WH C</td>
            </tr>
          </table>
        </th>
        <th style="border:1px solid #000;"	class="col-md-3"> TOTAL LOADING</th>
        <th style="border:1px solid #000;"	class="col-md-3"> TOTAL UNLOADING</th>
      </tr>
    </thead>
    <tbody>
      <?php
$totqty=0;
 foreach($list as $row2){  
	
	//$products = $this->lot_process_model->get_lot_order_item_details($row2['lot_master_id']);
//echo "<pre>";print_r($products);
?>
      <tr>
        <td style="border:1px solid #000;"><?php echo $row2[0]?></td>
        <td style="border:1px solid #000;"><?php echo $row2[1]?></td>
        <td style="border:1px solid #000;"><?php echo $row2[2]?></td>
        <td style="border:1px solid #000;"><table style="width: 100%">
            <tr>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center;height:33px">&nbsp;</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center;height:33px">&nbsp;</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center;height:33px">&nbsp;</td>
            </tr>
          </table></td>
        <td style="border:1px solid #000;"><table style="width: 100%">
            <tr>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center;height:33px">&nbsp;</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center;height:33px">&nbsp;</td>
              <td class="col-xs-4" style="border: solid 1px;border: solid 1px; text-align:center;height:33px">&nbsp;</td>
            </tr>
          </table></td>
          <td style="border:1px solid #000;">&nbsp; </td>
          <td style="border:1px solid #000;">&nbsp; </td>
      </tr>
      <?php }?>
    </tbody>
    <tfoot>
      <tr>
        <th style="border:1px solid #000;"	class="col-md-1"> PRODUCT CODE</th>
        <th style="border:1px solid #000;"	class="col-md-1"> PRODUCT NAME</th>
        <th style="border:1px solid #000;"	class="col-md-1"> QTY</th>
        <th style="border:1px solid #000; padding:0px; text-align:center"	class="col-md-2" > LOADING
        </th>
        <th style="border:1px solid #000; padding:0px; text-align:center"	class="col-md-3"> UNLOADING
        </th>
        <th style="border:1px solid #000;"	class="col-md-3"> TOTAL LOADING</th>
        <th style="border:1px solid #000;"	class="col-md-3"> TOTAL UNLOADING</th>
      </tr>
      </tfoot>
  </table>
  <hr>
</div>
<div class="row"> </div>
<!-- <br>

 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;No. Items (<?php //echo $tmpcount ?>), 

 Total Qty (<?php //echo rtrim(str_replace('.00', '', number_format($tot_qty, 2)), '0'); ?>)-->

<div class="col-xs-12"> 
  
  <!-- <div class="col-xs-5 pull-right" id="border_print" style="border:1px solid #000;">

 <table width="100%" border="0">

  <tr>

    <td><strong style="font-size:14px;">Sub Total RS</strong></td>

    <td style="text-align:right"><strong style="font-size:14px;"> <?php //echo $sales_rep_issue_details['total_amount']; ?></strong></td>

  </tr>

 

</table>





</div>--> 
  
</div>
<!--col-xs-12-->

<div class="col-xs-12 pull-right" id="border_print" style="border:0px solid #000;"><br>
  <br>
  Full Total :<br>
  <br>
  <br>
  Signature Issuing By :<br>
  <br>
  <br>
  Signature Check By :<br>
  <br>
  <br>
  Signature Receiving By : </div>

<!--print-start-->

</body>
