<?php
/*
///////////////////////////////////////////////////////////////////////
/  Project Name 	: Gurudev
/  File Name 		: report.php  
/  Created on  		: 18/08/2017
/  Created by       : Pintu
/  Last Changed By 	: 
/  Updated On		: 
/  Purpose			: To search report
/  ---------
/  
////////////////////////////////////////////////////////////////////////
*/
?>
<?php
	include('common/header.php');
?>
		<div class="">
			<div class="col-xm-12">
				<div class="widget-box light-border">
					<div class="widget-header header-color-grey">
						<h4 class="smaller">
							Search
						</h4>
					</div>
					
					<div class="widget-body">
						<div class="widget-main">
						  <div class="row">
							<div class="col-sm-12">
							<form class="form-horizontal" role="form">
							<div class="">
							<!-- PAGE CONTENT BEGINS -->
												
							<?php if($process != 'outstanding_payment') { ?>
								<div class="form-group">  
									<label class="col-sm-5 control-label" for="form-field-2"><?php echo 'Period From Date';?></label>
									<div class="col-sm-7">	
										<?php	
											$period_data=array('name'=>'period_from_date',
																	 'id'=>'period_from_date',
																	 'maxlength'=>'10',
																	 'placeholder'=>'Period From Date',
																	 'value'=> ''
																	);
											echo form_input($period_data,'');
											echo form_error('period_from_date');
										?>
									</div>
								</div>
								<div class="space-4"></div>
								<div class="form-group">  
									<label class="col-sm-5 control-label" for="form-field-2"><?php echo 'Period To Date';?></label>
									<div class="col-sm-7">	
										<?php	
											$period_data=array('name'=>'period_to_date',
																	 'id'=>'period_to_date',
																	 'maxlength'=>'10',
																	 'placeholder'=>'Period To Date',
																	 'value'=> ''
																	);
											echo form_input($period_data,'');
											echo form_error('period_to_date');
										?>
									</div>
								</div>
								<div class="space-4"></div>	
							<?php } if($process != 'outstanding_payment') { ?>
								<div class="form-group">  
									<label class="col-sm-5 control-label" for="form-field-2"><?php echo 'Dealer Company';?></label>
									<div class="col-sm-7">	
										<?php	
											$dealer_data=array( '' => 'Select Dealer Company',
																	 '1'=> 'Gurudev Corporation',
																	 '2'=> 'Sharp Enterprise',
																	 '3'=> 'Kreedai Exim'
																	);
											$js1 = 'id="dealer_id" onChange=""';
											echo form_dropdown('dealer_id', $dealer_data, '', $js1);
											echo form_error('dealer_id');
										?>
									</div>
								</div>
								<div class="space-4"></div>	
								<?php } ?>
								<?php //if($process == 'outstanding_payment' || $process == 'client') { ?>
								<div class="form-group">  
									<label class="col-sm-5 control-label" for="form-field-2"><?php echo 'Client';?></label>
									<div class="col-sm-7">	
										<?php	
											$dealer_data=array( '' => 'Select Client',
																	 'C001'=> 'Kritika Corporation',
																	 'C002'=> 'Marvels Pvt LTD'
																	);
											$js1 = 'id="client_id" onChange=""';
											echo form_dropdown('client_id', $dealer_data, '', $js1);
											echo form_error('client_id');
										?>
									</div>
								</div>
								<div class="space-4"></div>
							<?php //} ?>		
								<?php //if($process != 'outstanding_payment') { ?>
								<div class="form-group">  
									<label class="col-sm-5 control-label" for="form-field-2"><?php echo 'Agent';?></label>
									<div class="col-sm-7">	
										<?php	
											$agent_id_data=array( '' => 'Select Agent',
																	 'A001'=> 'Sagar Corporation',
																	 'A002'=> 'Sanskriti Pvt LTD'
																	);
											$js1 = 'id="agent_id" onChange=""';
											echo form_dropdown('agent_id', $agent_id_data, '', $js1);
											echo form_error('agent_id');
										?>
									</div>
								</div>
								<div class="space-4"></div>	
								<?php //} ?>
							<div class="form-group">  
									<label class="col-sm-5 control-label" for="form-field-2"><?php echo 'Vessel';?></label>
									<div class="col-sm-7">	
										<?php	
											$agent_id_data=array( '' => 'Select Vessel',
																	 'A001'=> 'Vessel 1',
																	 'A002'=> 'Vessel 2'
																	);
											$js1 = 'id="vessel_id" onChange=""';
											echo form_dropdown('vessel_id', $agent_id_data, '', $js1);
											echo form_error('vessel_id');
										?>
									</div>
								</div>
								<div class="space-4"></div>		
							<div class="form-group">  
								<label class="col-sm-5 control-label" for="form-field-2"><?php echo "Place / Location";?></label>
								<div class="col-sm-7">	
									<?php	
										$location_data=array('' => 'Select Place / Location',
														   'L101'=> 'Mulund',
														   'L102'=> 'Thane'
														   );
										$ls = 'id="city_id" onChange=""';
										echo form_dropdown('city_id',$location_data, '',$ls);
										echo form_error('city_id');
									?>
								</div>
							</div>
							<div class="space-4"></div>
							<?php if($process == 'outstanding_payment') { ?>
								<div class="form-group">
									<label class="col-sm-5 control-label" for="form-field-2"><?php echo 'No of Days';?></label>
									<div class="col-sm-7">	
										<?php	
											$outstanding_data=array('name'=>'outstanding',
																	 'id'=>'outstanding',
																	 'maxlength'=>'10',
																	 'placeholder'=>'No of Days',
																	 'value'=> ''
																	);
											echo form_input($outstanding_data,'');
											echo form_error('outstanding');
										?>
									</div>
								</div>
								<div class="space-4"></div>
							<?php } ?>	
						</div>
						</form>	
						</div>
						</div>
					   </div>	
					</div>
				</div>
			</div>
      	<!-- /.col -->
		</div>
		<?php if($process=='outstanding_payment') { ?>
		<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/<?php echo REPORT_PATH;?>report_list_outstanding_payment/<?php echo $process;?>'">
					Search
				</button>
			</div>
		</div>
		<?php } else if($process=='client') { ?>
		<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/<?php echo REPORT_PATH;?>report_list_client/<?php echo $process;?>'">
					Search
				</button>
			</div>
		</div>
		<?php }else if($process=='agent') { ?>
		<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/<?php echo REPORT_PATH;?>report_list_agent/<?php echo $process;?>'">
					Search
				</button>
			</div>
		</div>
		<?php }
		 else if($process=='dealer') { ?>
		<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/<?php echo REPORT_PATH;?>report_list_dealer/<?php echo $process;?>'">
					Search
				</button>
			</div>
		</div>
		<?php } else if($process=='location') { ?>
		<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/<?php echo REPORT_PATH;?>report_list_location/<?php echo $process;?>'">
					Search
				</button>
			</div>
		</div>
		<?php }
		else { ?>
		<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/<?php echo REPORT_PATH;?>list_employee/<?php echo $process;?>'">
					Search
				</button>
			</div>
		</div>
		<?php } ?>
		<div class="space-4"></div>
		<!-- /.page-row -->
        <!-- /.page-content --> 
      </div>
      <!-- /.main-content --> 
      
    </div>
    <!-- /#ace-settings-container --> 
  </div>
  
  <!-- /.main-container-inner --> 
<script type="text/javascript">
$(document).ready(function() {
    $('form:first *:input[type!=hidden]:first').focus();
	
	$("#period_from_date").datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "button",
			  buttonImage: "<?php echo ASSETS_PATH;?>images/calendar.jpg",
			  buttonImageOnly: true,
			  buttonText: "Select date",
		dateFormat:'dd/mm/yy'	
	});
	$("#period_to_date").datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "button",
			  buttonImage: "<?php echo ASSETS_PATH;?>images/calendar.jpg",
			  buttonImageOnly: true,
			  buttonText: "Select date",
		dateFormat:'dd/mm/yy'	
	});
});
</script>
<?php
	include('common/footer.php');
?>