<?php
	include('common/header.php');
?>
<div class="row">
		<div class="widget-box light-border">
			<div class="widget-header header-color-grey">
				<h4 class="smaller">
					Invoice Search
				</h4>
			</div>
			<div class="widget-body">
				<div class="widget-main">
					<div class="row">
						<div class="col-sm-12">
						
							<!-- PAGE CONTENT BEGINS -->	
							<div class="col-sm-3">	
								<div class="form_group">  
									<label class="col-sm-5 control-label" for="form-field-2" ><?php echo form_label('Invoice No', 'receipt_no'); ?></label>
									<div class="col-sm-7"><input type="text" name="invoice_no" placeholder="Invoice No"></div>
								</div>
								<div class="space-4"></div>
							</div>
							<div class="col-sm-3">	
								<div class="form_group">  
									<label class="col-sm-5 control-label" for="form-field-2" ><?php echo form_label('Dealer Company', 'dealer_id'); ?></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>
							</div>
							<div class="col-sm-3">	
								<div class="form_group">  
									<label class="col-sm-5 control-label" for="form-field-2" ><?php echo form_label('Client', 'client_id'); ?></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>
							</div>
							
							<div class="col-sm-2 text-center">
								<button class="btn btn-info" type="button">
									Search
								</button>
							</div>	
						</div>
					</div>
					
					</form>	
				
			   </div>	
			</div>
		</div>
		<div class="space-4"></div>
		<div class="table-header">
			Invoice Listing
		</div>
		<div class="table-responsive">
		<table cellspacing="0" width="100%" class="table table-bordered table-condensed">
			<thead>	
				<tr>
					<th style="background-color:##F5F5F5;">SR No.</th>
					<th style="background-color:##F5F5F5;">Invoice No</th>
					<th style="background-color:##F5F5F5;">Invoice Date</th>
					<th style="background-color:##F5F5F5;">Dealer Name</th>
					<th style="background-color:##F5F5F5;">Client Name</th>
					<th style="background-color:##F5F5F5;">Place / Location</th>
					<th style="background-color:##F5F5F5;">Bill Amount (IN INR)</th>
					<th style="background-color:##F5F5F5;">Tax (IN %)</th>
					<th style="background-color:##F5F5F5;">Total Amount with GST (IN INR)</th>
					<th style="background-color:##F5F5F5;">Received (IN INR)</th>
					<th style="background-color:##F5F5F5;">Balance (IN INR)</th>
					<th style="background-color:##F5F5F5;">Action</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>1</td>
					<td>9501</td>
					<td>24/07/2017</td>
					<td>Gurudev Corporation</td>
					<td>Kritika Corporation</td>
					<td>Thane</td>
					<td>236000.000</td>
					<td>18%</td>
					<td>278480.000</td>
					<td>0.000</td>
					<td>278480.000</td>
					<?php if($this->uri->segment(2) == 'receipt') { ?>
					<td><a href="<?php echo base_url();?>index.php/<?php echo RECEIPT_PATH;?>generate_receipt">Generate Receipt</a></td>
					<?php }else if($this->uri->segment(2) == 'invoice'){ ?>
					<td><a href="<?php echo base_url();?>index.php/<?php echo INVOICE_PATH;?>view_invoice">View</a> | <a href="<?php echo base_url();?>index.php/<?php echo INVOICE_PATH;?>add_invoice/edit">Edit</a></td>
					<?php } ?>
				</tr>
				<tr>
					<td>2</td>
					<td>9502</td>
					<td>10/08/2017</td>
					<td>Gurudev Corporation</td>
					<td>Kritika Corporation</td>
					<td>Thane</td>
					<td>354000.000</td>
					<td>18%</td>
					<td>417420.000</td>
					<td>0.000</td>
					<td>417420.000</td>
					<?php if($this->uri->segment(2) == 'receipt') { ?>
					<td><a href="<?php echo base_url();?>index.php/<?php echo RECEIPT_PATH;?>generate_receipt">Generate Receipt</a></td>
					<?php }else if($this->uri->segment(2) == 'invoice'){ ?>
					<td><a href="<?php echo base_url();?>index.php/<?php echo INVOICE_PATH;?>view_invoice">View</a> | <a href="<?php echo base_url();?>index.php/<?php echo INVOICE_PATH;?>add_invoice/edit">Edit</a></td>
					<?php } ?>
					
				</tr>				
				<tr>
					<td colspan="13" align="center"><a href="#"><p style="margin-right:50px;"><b> Export To Xls</b></p></a></td>
				</tr>
			</tbody>
		</table>
		</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/<?php echo REPORT_PATH;?>search/client'">
					Back
				</button>
			</div>
		</div>
	</div>
</div>
<div>
	<!-- /.page-row -->
    <!-- /.page-content --> 
</div>
<!-- /.main-content -->  
</div>
<!-- /#ace-settings-container --> 
</div>
<!-- /.main-container-inner --> 
<?php
	include('common/footer.php');
?>