<?php
	include('common/header.php');
?>
	<div class="">
		<div class="col-xm-12">
			<div class="widget-box light-border">
				
				<div class="widget-body">
					<div class="widget-main">
						<div class="row">
							<div class="col-sm-12">
								<form class="form-horizontal" role="form" name="module_form" id="module_form">
								
 								 <section class="panel panel-default">
                 				 <header class="panel-heading bg-info lt font-bold">Dispenser Details</header>
                  <!-- panel body start -->
                  <div class="panel-body bs-example form-horizontal">
                    <div class="">
                     <div class="hr hr12 dotted"></div>
                       <div class="">
                        <!-- main col-sm-12 -->
                      <div class="col-sm-12"> 
                         <div class="col-sm-6">
                           <div class="form-group">
                            <label for="client_code" class="col-sm-5 control-label required">Customer Name:</label>
                              <div class="col-sm-7">
                                 <label>Sinoy Thomson</label>              
                              </div>	
                            </div>
                          </div>
                        
                          <div class="col-sm-6">
                           <div class="form-group">
                            <label for="client_code" class="col-sm-5 control-label required">Dispenser Name:</label>
                              <div class="col-sm-7">
                               <label>Aerosal</label>            
                              </div>	
                            </div>
                          </div>

                        </div>
                            
                         <!-- </div> -->
                         <!-- main col-sm-12  close-->
                       </div> <!-- blank close -->
        </div><!-- blank close -->
      </div>   <!-- panel body close -->
    </section> <!-- section close -->
																	                                  							      
									<br>
									<br>
                                  <div>
                                  	 <section class="panel panel-default">
                 				 <header class="panel-heading bg-info lt font-bold">Refill Details</header>
                                
									<table id="simple-table" class="table  table-bordered table-hover">
											<thead>
												<tr>
													<th>Sr No</th>
													<th>Select Tracking Numbers</th>
													<th>Dispenser Quatity</th>
													<th>Return Quantity</th>
													<th>Reason</th>
													<th>Comment</th>									
													
												</tr>
											</thead>

											<tbody><div class="form-holder-append">
										     <td>1</td>

										      <td>  	
											    <select  style="width:218px;" name="tracking_no" multiple >

												    <option>JDU-123</option>
													<option>JDU-124</option>
													<option>JDU-125</option>
													<option>JDU-130</option>

												</select>
														
													
                                              </td>
												
                                             <td>
                                             	
                                             	10
                                             </td>
											 <td>
                                             	<input type='text' name='refill_quantity' placeholder='' style="width: 63px;" maxlength="3">
                                             </td>
                                             <td>
                                             	<select name='rname' id='rname'>
                                             		<option>Select Reason</option>
                                             		<option>Damage</option>
                                             		<option>Return</option>
                                             		<option>Other</option>
                                             	</select>
                                             </td>
											 <td>
                                             	<textarea></textarea>
                                             </td>
												
                                            
											 </div>

											</tbody>   
                                             
                                    </table>
                              </section>
 

                                  </div>
                                 	<div class="clearfix form-actions">
		<div class="col-md-offset-5 col-md-5">
			<button class="btn btn-info" type="button" onclick="javascript:window.location='<?php echo base_url();?>index.php/gc/dispenser_sale_data/refill_and_track_data'">
				Submit 
			</button>
		</div>
	</div>						       
         		
								</div> 
								
								</form>	
							</div>
						</div>
					</div>	
				</div>
			</div>
		</div>
		<!-- /.col -->
	</div>
	
	<div class="space-4"></div>
		<!-- /.page-row -->
        <!-- /.page-content --> 
    </div>
    <!-- /.main-content --> 
	</div>
    <!-- /#ace-settings-container --> 
	</div>
	<!-- /.main-container-inner --> 
<script>
function hide()
{
	document.getElementById("admin_type_code").style.display="none";
}
function show()
{
	document.getElementById("admin_type_code").style.display="";
}
</script>
<script type="text/javascript">
$(document).ready(function() {
    $('form:first *:input[type!=hidden]:first').focus();
});
</script>	
<script type="text/javascript">
 $('#date-timepicker2').datepicker({dateFormat: 'dd-mm-yy'});
                 //format: 'MM/DD/YYYY h:mm:ss A',//use this option to display seconds
</script>

<script type="text/javascript">
	  $(document).ready(function(){
	  	 // $("#simple-table").hide();
	  	  $("#action").hide();

	  	  });
</script>
<script>
	$(document).ready(function(){
        $("#addrefill").click(function(){
        	$("#simple-table").show();
			
			 $("#action").show();
			//var id_count = 1;
            // var Dispenser_type = "<td><select name='customer_type' id='customer_type'><option>Select Product Name of Type dispenser</option><option>Dispenser1</option><option>Dispenser2</option><option>Dispenser3</option></select></td>";

            // var dispenser_quantity = "<td><input type='text' name='dispenser_quantity' placeholder='1'></td>";

            var srno= 2 ;


            var srno="<td>"+ srno +"</td>";

            var refill_name = "<td><select name='rname' id='rname'><option>Select Refill name</option><option>soap</option><option>paper</option><option>Watertreatment</option></select></td>"; 

          var programming_days = "<td><select name='rname' id='rname'><option>Select Programming Duration Days</option><option>15</option><option>30</option><option>45</option><option>60</option></select></td>"; 

           																							
            var refill_quantity ="<td><input type='text' name='refill_quantity' style='width: 63px;' maxlength='3'></td>"; 



            var refill_duration = "<td><div class='input-group'style='width:183px;'><input id='date-timepicker3' type='text' class='form-control' style='width:144px;''></div></td>"; 

        	var location ="<td><input type='text' name='location' placeholder='Enter Refill Location'></td>"; 
                                                            
                                                                                                                                                                                                 
            var tracking_no = "</thead><td><select name='tracking_no' style='width:218px;' multiple><option>JDU-123</option><option>JDU-124</option><option>JDU-125</option><option>JDU-130</option></select></td>";

            // var comments = "<td><div class='col-sm-7'><div class='form-group'><textarea class='form-control' id='comment' style='width:234px; height:45px;'></textarea></div></div></td>";																		
								
            // var markup ="<tr><td><input type='checkbox' name='record'></td>" + Dispenser_type + dispenser_quantity + refill_name + refill_quantity + refill_expiry + "</tr>";
            var markup ="<tr></td>" + srno + tracking_no +refill_name + programming_days + refill_quantity + refill_duration + location + "<td class='center'><label class='pos-rel'><button type='button'  class='btn btn-danger' name='record' onclick='SomeDeleteRowFunction(this)'>Delete</button></label</tr>";

            $("table tbody").append(markup);

            $('#date-timepicker3').datepicker({dateFormat: 'dd-mm-yy'});

        }); 
    });    
</script>
<script>
	function SomeDeleteRowFunction(btndel) {
    if (typeof(btndel) == "object") {
        $(btndel).closest("tr").remove();
    } else {
        return false;
    }
}
</script>
<script type="text/javascript">
 $('#date-timepicker2').datepicker({dateFormat: 'dd-mm-yy'});
                 //format: 'MM/DD/YYYY h:mm:ss A',//use this option to display seconds
</script>
<script type="text/javascript">
 $('#date-timepicker3').datepicker({dateFormat: 'dd-mm-yy'});
                 //format: 'MM/DD/YYYY h:mm:ss A',//use this option to display seconds
</script>

<?php
	include('common/footer.php');
?>
  
												
						
					
