<!DOCTYPE html>

<html>

   <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      

      <title>GRN Item Barcodes | Stock Manager Advance</title>

      <meta http-equiv="X-UA-Compatible" content="IE=edge">

      <link rel="stylesheet" href="<?php echo asset_url(); ?>plugins/bootstrap/css/bootstrap.min.css">

      <link rel="stylesheet" href="<?php echo asset_url(); ?>plugins/font-awesome/css/font-awesome.min.css">

      

       <style>

.table.barcodes td {

   border-top: 0px;

   padding: 0px;

}

.table.barcodes .table-barcode {

    width: 100%;

}

.table.barcodes .table-barcode td {

    padding: 2px!important;

}

.bold {

    font-weight: 900;

}

.table-barcode tr{ line-height: 0.5; }



table{ line-height: 1.5; margin-bottom: 0px;  margin-left: 0mm;}


/*
img{width: 170px; height: 50px;}
*/
      body{font-size:13px;text-align:center;color:#000;background:#FFF;}body:before,body:after{display:none;}.tab-wrapper{max-width:1000px;margin:0 auto;}.table td{text-align:center;}h4{margin:5px;padding:0;}@media print {.table td{border-color:#F9F9F9!important;}.tab-wrapper{width:auto!important;}h3{margin-top:0;}.container p,.pagination,.well{display:none;}hr{page-break-after:always;}}

/*	  
.is_box{
	
	margin-left:2%;
	float:left;
	margin-bottom:10px;
        margin-top:10px;
        margin-right:5%;
		text-align:center;
		width:175px;
}
*/


/*
.is_box{
	width:29%;

	margin-left:3%;
	float:left;
	margin-bottom:20px;
        margin-top:1px;
}

*/

/*
.is_box{
	width:29%;

	margin-right:4%;
	float:right;
	margin-bottom:10px; 
        margin-top:5px;
}
*/


.is_box{
    width: 130px;
    margin-left: 1px;
    float: left;
    margin-bottom: 20px;
    margin-top: 5px;
    margin-right: 1%;
}

/*
img{
width:105px !important;
}
*/

body {
    font-size: 16px;
font-weight: bold;

}
.top_text{
	font-size:10px;
	font-weight:normal;
	line-height:1.1;
}
.sn_box{
	float:left;
	width:30%;
	margin-right:2%;
	text-align:left;
	
}

.sn_wap{
	width:100%;
	min-height:100px;
	float:left;
}
      </style>

   </head>

   <body>

      <div class="tab-wrapper">


         <div class="well">

 <div class="sn_box" style="float:left">
      <input id="checkAll" onClick="check_sn('all')" class="check_sale_id_list" type="checkbox" name="" value="" checked>Select All
      </div>
            <span style="margin-top:15px; display: block;">
            
            
                  <div class="sn_wap">
      
      
      
      <?php 
	  foreach ($sn_list as $sn) 
 {	
				
	 //$sale_id=$row['sale_id'];
        // $sale_des=$sale_model_ref->get_sale_info($sale_id);
        // $route_des=$route_model_ref->get_route_name_by_id($sale_des['route_id']);
	 //print_r($route_des);
	// echo "sale id:".$sale_id;	
	// echo "<div class=\"is_box\">";	
         $card_ref_number=$sn->pis_number;
		 $name=substr($sn->product_name, 0, 20);
		 $name_2='';//substr($sn->product_name, 26, 100);
          //echo "";
	 ?>
	  <div class="sn_box">
      <input id="cb_<?php echo $sn->pis_number;?>" onClick="check_sn('<?php echo $sn->pis_number;?>')" class="check_sale_id_list" type="checkbox" name="check_sale_id_list[]" value="244" checked> <?php echo $sn->pis_number;?>
      </div>
      <?php 
	  
 }?>
      </div>

               <div class="btn-group">
               
               
               

                  <a class="btn btn-primary" href="#" onclick="window.print(); return false;"><i class="fa fa-print"></i> Print</a>

                  <a class="btn btn-danger" onclick="javascript:window.close()"><i class="fa fa-times"></i> Close</a>

               </div>

            </span>

         </div>
<?php //echo "Test:$issue_card_details";
//print_r($sn_list);

//echo "<br/>qty:".$qty;

//$sale_model_ref=new Sales_Model();
//$route_model_ref=new Route_Model();

foreach ($sn_list as $sn) 
 {	
		//	print_r($sn);	
	 //$sale_id=$row['sale_id'];
        // $sale_des=$sale_model_ref->get_sale_info($sale_id);
        // $route_des=$route_model_ref->get_route_name_by_id($sale_des['route_id']);
	 //print_r($route_des);
	// echo "sale id:".$sale_id;	
	 echo "<div class=\"is_box\" id=\"sn_$sn->pis_number\">";	
	 //strtolower
         $card_ref_number=($sn->pis_number);
		 $name=substr($sn->product_name, 0, 28);
		// echo "id:$sn->product_id";
		 $name_2='';//substr($sn->product_name, 26, 100);
          //echo "";
	 ?>
          
          <div class="top_text"><b>LASER MOBILE</b></div> 
	 <img src="<?php echo base_url().'products/gen_barcode/'.$card_ref_number.'/16'; ?>" alt='<?php echo $card_ref_number; ?>' />	
	 
	 <div class="top_text" style="font-size: 8px;"> 
		  <?php echo $name;?> 
          </div>
          <div class="top_text"> 
		  Rs. <?php echo number_format($sn->pis_cash_price, 0, '.', ',');?> /=
          </div>
     <?php
	 echo "</div>";
			
 }

 ?>
        
        <!-- <div style="width:100%; float:left">&nbsp;</div> -->

        

      </div>

   </body>
   <script src="<?php echo asset_url(); ?>plugins/jQuery-lib/2.0.3/jquery.min.js"></script>
 <script>
 
 $('#checkAll').click(function () {    
 	//alert(1);
	if ($('#checkAll').prop('checked')==true){ 
    $('input[type="checkbox"]').prop("checked", true);
	$(".is_box").show();
	}else{
		$('input[type="checkbox"]').prop("checked", false);
		$(".is_box").hide();
	}
});
 
 function check_sn(sn){
	  var fld="#sn_"+sn;
	   var fld_cb="#cb_"+sn;
	  // alert(fld_cb);
	  if ($(fld_cb).prop('checked')==true){ 
        $(fld).show();
		//$(".is_box").show();
    	}
	else{
	$(fld).hide();
	//$(".is_box").hide();
	}
 }
 
 </script>
</html>