<?php $this->load->view("common/header"); ?>
<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>
<body onLoad="window.print()">
    <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>
<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;"><?php echo $details['name'] ?></h3>
    <h5 class="center" style="font-family:'Times New Roman', Times, serif; margin-bottom:3px; letter-spacing:2px;">DELIVERY SHEET</h5>
   
    <div class="col-xs-6">
      <p>DATE - <?php  $date=date_create($details['added_date_time']);echo date_format($date,"Y-m-d"); ?></p>
      <p>REF.NO : <?php echo $details['d_ref_no']?></p>
      <p>VEHICLE :  <?php echo $details['vehicle_code']?> </p>
      <p>DRIVER : <?php echo $details['user_first_name']?></p>
    </div>
    <div class="col-xs-6 pull-right" style="padding-left:160px;"> <p>PRINT ON <?php echo date("Y-m-d h:i:sa"); ?></p> <p>PRINT BY <?php echo $this->session->userdata('ss_user_first_name')  ?></p></div>
  </div>
</div>

  <div class="col-xs-12"> 
  <table class="print-table" width="100%" style="border:1px solid #000; text-align:left">
    <thead>
      <tr>
          <td style="border:1px solid #000;">CUSTOMER</td>
      	<td style="border:1px solid #000;">ADDRESS</td>
      	<td style="border:1px solid #000;">CONTACT<br>NO</td>
        <td style="border:1px solid #000;">DISPATCH<br>NO</td>
       
        <td style="border:1px solid #000;">PRODUCT</td>
      
         <td style="border:1px solid #000;">QTY</td>
         <td style="border:1px solid #000;">STATUS</td>
        
      </tr>
    </thead>
    <tbody>
      <?php
$totqty=0;
 foreach($dispatch_note_list as $row2){
 $count=0;
foreach($product_list as $pd){ 
    if($pd->dnm_id!=$row2['dpn_id']){continue;}
      $count++;?>
      <tr>
        <?php if($count==1){ ?>
        <td style="border:1px solid #000;"><?php echo $row2['cus_name']?></td>
       <td style="border:1px solid #000;"><?php echo $row2['cus_address']?></td>
       <td style="border:1px solid #000;"><?php echo $row2['cus_phone']?></td>
        <td style="border:1px solid #000;"><?php echo $row2['dpn_ref_no']?></td>
        <?php }else{ ?>
        <td style="border:1px solid #000;"></td>
        <td style="border:1px solid #000;"></td>
         <td style="border:1px solid #000;"></td>
          <td style="border:1px solid #000;"></td>
      
        <?php } ?>
      
        <td style="border:1px solid #000;"><?php echo $pd->product_code;?> (<?php echo $pd->unit_code;?>) <br> <?php echo $pd->product_name;?>  </td>
        <td style="border:1px solid #000;"><?php echo $pd->issued_qty;?></td>
        
        <td style="border:1px solid #000;"></td>
      </tr>
      <?php } ?>
      <?php }?>
    </tbody>
  </table>
  </div>
</div>


<!--col-xs-12-->
<!--<div class="col-xs-12" id="border_print" style="text-transform: uppercase;">
    <br>  <br>
  <div class="col-xs-4">.................................... <br>Signature Issuing By  </div>
  <div class="col-xs-4">....................................  <br>Signature Check By  </div>
    <div class="col-xs-4">.................................... <br> Signature Receiving By </div>
  </div>-->

<!--print-start-->

</body>
</html>
