<?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">
h3 {
	margin-top: 10px;
}
th {
	text-align: center !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()">
    <div class="col-xs-12">
<div class="row">
<div class="col-xs-12 text-center">
<p>
    <h3> TRANSFER NOTE  (RAW MATERIALS)</h3>
<!--<h5> <?php echo  $master_details['name']; ?> </h5>-->
<!--<h6> <?php echo  $master_details['address']; ?> </h6>-->
<!--<h6> <?php echo  $master_details['phone']; ?> </h6>-->

</P>
</div><!--col-xs-12-->
</div><!--row-->
<div class="row">
  <div class="col-xs-12">
    <div class="col-xs-6" style="border:solid 1px;">       
        <table class="print-table" width="100%" style="border:none">
        <tr>
          <td > Transfer NO  </td>
          <td > : <?php echo $master_details['stm_no']; ?></td>
        </tr>
        <tr>
          <td > Document NO </td>
          <td > : <?php echo $master_details['stm_ref_no']; ?></td>
        </tr>
       
        <tr>
          <td > Date Time</td>
          <td > : <?php echo $master_details['stm_date_time']; ?></td>
        </tr>
       
        <tr>
          <td > Prepare By </td>
          <td > : <?php echo $master_details['user_first_name']; ?></td>
        </tr>
      </table>
        
        

    </div>
    <div class="col-xs-6 pull-right">
      <table class="print-table" width="100%" style="border:none">
        <tr>
          <td style="border:1px solid #000"> From Location </td>
          <td style="border:1px solid #000"> <?php echo  $master_details['name']; ?></td>
        </tr>
        
         <tr>
          <td style="border:1px solid #000"> To Location </td>
          <td style="border:1px solid #000"> <?php echo  $master_details['outlet_name']; ?></td>
        </tr>
      
        <tr>
          <td style="border:1px solid #000"> Completed-up On </td>
          <td style="border:1px solid #000"><?php if($master_details['stm_status']==1){echo $master_details['stm_on'];}else{ echo "";}  ?></td>
        </tr>
         <tr>
          <td style="border:1px solid #000"> Post Status </td>
          <td style="border:1px solid #000"><?php if($master_details['stm_receved_status']==1){echo "POST COMLETED";} ?></td>
        </tr>
      </table>
    </div>
  </div>
</div>
<!--lorry rep; due date;--> 
<br>
<div class="print-start" style="border:solid 1px; " ><!-- min-height:560px;-->
    <h5 class="text-center">Transfer Items</h5>
  <table class="print-table" width="100%" style="border:none">
    <thead>
      <tr class="report_view_th text-center"  style="border:1px solid #000">
        <th style="border:1px solid #000; width:40px;" class='width_cus'>
          No</th>
        <th class="col-xs-5" style="border:1px solid #000">
          Description</th>
          
        <!--  <th style="border:1px solid #000";>
          Type</th>
          
          <th style="border:1px solid #000";>
          Unit</th> -->
        <th  style="border:1px solid #000";>
          Qty</th>
      </tr>
    </thead>
    <tbody>
      <?php 
 $tmpcount=0;
  foreach ($items_details as $row)
 {
	 $tmpcount++; ?>
      <tr style="line-height:18px">
        <td style="text-align:center; vertical-align:middle; border:none"><?php echo $tmpcount ?>)</td>
        <td  ><?php echo $row['product_mat_name']; ?>
          <?php echo $row['product_mat_code']; ?></td>
          <!--<td  ><?php echo $row['mpt_name']; ?></td>
          <td  ><?php echo $row['unit_name']; ?></td>-->
        <td style="text-align:right; vertical-align:middle; border:none"><strong><?php echo number_format($row['quantity'], 3, '.', ','); ?></strong></td>
      </tr>
      <?php }?>
    </tbody>
  </table>
</div>
<br>
   
    

    
   </div>
  
</div>
 <!--col-xs-12-->
 <div class="col-xs-12">
     <br>
     <div class="col-xs-12" id="border_print" style="border:1px solid #000;">
     <p class="text-center"><strong>Note</strong> <br><?php echo $master_details['stm_note'];  ?></p>
   </div>
  
  <div class="col-xs-2" style="border-top:dashed 1px; margin:50px 5px 0px 25px">
     <center>
      Printed By (<?php echo $this->session->userdata('ss_user_first_name')." ". $this->session->userdata('ss_user_last_name') ?>)
    </center>
   </div>
  <div class="col-xs-2" style="border-top:dashed 1px; margin:50px 5px 0px 25px">
     <center>
      Checked By
    </center>
   </div>
  <div class="col-xs-2" style="border-top:dashed 1px; margin:50px 5px 0px 25px">
     <center>
      Issued By 
    </center>
   </div>
  <div class="col-xs-2" style="border-top:dashed 1px; margin:50px 5px 0px 25px">
     <center>
      Recived By
    </center>
   </div>
</div>
 <div class="col-xs-12">
  <!--<p class="text-center" style="font-size:17px;">
     <strong>Thank You! </strong></p>-->
</div>

 <!--print-start-->
</div>
 </body>
