<?php
	include('common/header.php');
	$dispenser_id='';
?>
<div id="messages" style="color: green;"><h5><?php echo $this->session->flashdata('message'); ?></h5></div>
	<div class="">
		<div class="col-xm-12">
			<div class="widget-box light-border">
				<!-- <div class="widget-header header-color-grey">
					<h4 class="smaller">
						 
					</h4>
				</div> -->
				<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" onsubmit="return validateForm()" method="post" action="<?php echo base_url()?>index.php/<?php echo REFILL_TRACK;?>list_stop_refill">
								<div class="">
									<!-- PAGE CONTENT BEGINS -->
									
									<!-- <div class="form-group">  
										<label class="col-sm-5 control-label" for="form-field-2" ><?php echo $lable_refill_due_country;?></label>
										<div class="col-sm-7">	
											 <?php
											 	$country_array_data=$country_array;
												$js1 = 'id="country_id"  class="form-control" style="width:262px" onchange="get_state(this.value);"';
												echo form_dropdown('country_id', $country_array_data, $country_id, $js1);
											?>
										</div>
									</div> -->
								<!-- 	<div class="form-group">  
										<label class="col-sm-5 control-label" for="form-field-2" ><?php echo $lable_refill_due_state;?></label>
										<div class="col-sm-7" id="state_id_div">	
											<select name="state_id" id="state_id" onchange="get_city(this.value);" style="width:262px">
												<option value="">Select State</option>
											</select>
										</div>
									</div>	 -->
									<!-- <div class="form-group">  
										<label class="col-sm-5 control-label" for="form-field-2" ><?php echo $lable_refill_due_city;?></label>
										<div class="col-sm-7">	
											<select name="city_id" id="city_id" style="width:262px">
												<option value="">Select City</option>
											</select>
										</div>
									</div>	 -->
									
									<div class="form-group">  
										<label class="col-sm-5 control-label" for="form-field-2" ><?php echo 'Customer Name';?></label>
										<div class="col-sm-7">	
										<!-- 	<?php
												$customer_array_data=$customer_array;
												$js1 = 'class="select2 select2-multiple form-control" name="customer_id"  style="width:262px" id="customer_id" multiple="multiple" data-placeholder="Choose"';
												echo form_dropdown('customer_id', $customer_array_data, $customer_id, $js1);
												?> -->
												<select class="select2 select2-multiple form-control" name="customer_id" multiple="multiple" id="customer_id" style="width: 250px;">
													<option value="">Select Customer</option>
												</select>
										</div>
									</div>

									<div class="form-group">  
										<label class="col-sm-5 control-label" for="form-field-2" ><?php echo 'Dispenser Name';?></label>
										<div class="col-sm-7">	
											 <?php
												$refill_array_data=$refill_array;
												$js1 = 'id="dispenser_id"  class="form-control"  style="width:262px"';
												echo form_dropdown('dispenser_id', $refill_array_data, $dispenser_id, $js1);
											?>
										</div>
									</div>	

								<!-- 	<div class="form-group">  
										<label class="col-sm-5 control-label" for="form-field-2" ><?php echo $lable_refill_due_report;?></label>
										<div class="col-sm-7">	
											<select name="refill_due" id="refill_due" style="width:262px">
												<option value="">Select Refill Due Report</option>
												<option value="10" selected>Todays refill due</option>
												<option value="1">All previous refill due</option>
												<option value="7">Next 7 days refill due</option>
												<option value="15">Next 15 days refill due</option>
												<option value="30">Next 30 days refill due</option>	
											</select>
										</div>
									</div> -->
								</div>
								
								
							</div>
						</div>
					</div>	
				</div>
			</div>
		</div>
		<!-- /.col -->
	</div>
	<div class="clearfix form-actions">
		<div class="col-md-offset-5 col-md-5">
		
			<button class="btn btn-info" type="submit">
				 Search
			</button>
		</div>
	</div>
	</form>	
	<div class="space-4"></div>
		<!-- /.page-row -->
        <!-- /.page-content --> 
    </div>
    <!-- /.main-content --> 
	</div>
    <!-- /#ace-settings-container --> 
	</div>
	<!-- /.main-container-inner --> 
<?php
	include('common/footer.php');
?>
<script>
function hide()
{
	document.getElementById("admin_type_code").style.display="none";
}
function show()
{
	document.getElementById("admin_type_code").style.display="";
}
$(document).ready(function(){
  
	$("#del").hide();
 //  $(".js-example-tags").select2({
	//   tags: true
	// });
  
	 $(".select2").select2();  
	 $(".select2").prop("multiple", "");

	$("#customer_id").select2({
		 tags: true,
		multiple: false,
		tokenSeparators: [',', ' '],
		minimumInputLength: 3,
		minimumResultsForSearch: 10, 
		ajax: {
			url: '<?php echo base_url();?>index.php/gc/refill_sale_data/customer',
			dataType: "json",
			type: "POST",
			data: function (params) {

				var queryParameters = {
					customer_id: params.term
				}
				return queryParameters;
			},
			processResults: function (data) {
				return {
				  results: data
				};
			}
		}
	});


  });
</script>


<script type="text/javascript">
    function validateForm(){

      var refill_tracking_number = document.getElementById('refill_tracking_number').value;                               
       if(refill_tracking_number == ""){
        document.getElementById('refill_tracking_number1').innerHTML =" ** Please fill the  Refill Tracking field";
        return false;
      }
    }
</script>