			<div class="content">
            
				<div class="main-content">
					<!-- DATA EXPORT -->
					<div class="widget widget-table">
						<div class="widget-header">
							<h3><i class="fa fa-user"></i> Purchase detail</h3> <em> - Add New Purchase Record</em>
									<div class="btn-group widget-header-toolbar">
										<a class="btn-borderless btn-focus clickme" href="purchaseView" title="Focus" ><i class="fa fa-plus"></i></a>
										<!--<a href="#" title="Expand/Collapse" class="btn-borderless btn-toggle-expand"><i class="fa fa-chevron-up"></i></a>
										<a href="#" title="Remove" class="btn-borderless btn-remove"><i class="fa fa-times"></i></a>-->
									</div>
						</div>
						<div class="widget-content">
<form id="frmmain" name="frmmain" data-parsley-validate novalidate>
<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">						
						
<div class="alert  alert-info " >
    <ul><li class="fa fa-cog  fa-1x fa-fw"></li>Kindly enter Purchase Detail..</ul>
</div>						
<div class="alert alert-success print-success-msg" style="display:none">
    <ul></ul>
</div>	
<div class="alert alert-danger print-error-msg" style="display:none">
    <ul></ul>
</div>
						
<div class="col-md-6">
							<!-- ADVANCED VALIDATION -->
								<div class="widget-content">  
                       
                        <div class="form-group">
                            <label for="text-input1">Bill No.*</label>
                            <input type="text" name="itemcode" id="itemcode" class="form-control" value="<?php echo e(isset($data) ? $data[0]->itm_code : ''); ?>" onchange="validatecode(this.value)">
                            <small class="text-danger" id="erritemcode"></small>
                        </div>
                        
                        <div class="form-group">
                            <label for="multiselect1">Company*</label>
                                <select name="itemcategory" id="itemcategory" class="form-control" required onchange="loadsubcat(this.value)">
								<option value="0">-- Select --</option>
                                </select>
                            <small class="text-danger" id="erritemcategory"></small>
                        </div> 
                   
								</div>
							<!-- END ADVANCED VALIDATION -->
</div>
							
<div class="col-md-6">
							<!-- ADVANCED VALIDATION -->
								<div class="widget-content">
                       
                        <div class="form-group">
                            <label for="text-input1">Bill date*</label>
                               <input type="date" name="salescost" id="salescost" class="form-control" >
								<small class="text-danger" id="erritemtype"></small>
                        </div>
                        
                        <div class="form-group">
                            <label for="multiselect1">Seller*</label>
                                <select name="itemcategory" id="itemcategory" class="form-control" required onchange="loadsubcat(this.value)">
								<option value="0">-- Select --</option>
                                </select>
                            <small class="text-danger" id="erritemcategory"></small>
                        </div>
								</div>
							<!-- END ADVANCED VALIDATION -->
</div>                    
                    </form>
                    
						</div>
						
					</div>
					<!-- END DATA EXPORT -->
					
					
										<!-- DATA EXPORT -->
					<div class="widget widget-table">
						<div class="widget-header">
							<h3><i class="fa fa-user"></i> Item Record</h3> <em> - Add item details</em>
						</div>
						<div class="widget-content">
<form id="frmmain" name="frmmain" data-parsley-validate novalidate>

<div class="col-md-3">
		<div class="form-group">
			<label for="multiselect1">Item Name*</label>
			<br/>
				<select name="status" id="status" class="form-control" required>
				</select>
			<small class="text-danger" id="errstatus"></small>
		</div>
</div>
<div class="col-md-3">
	<div class="form-group">
		<label for="multiselect1">Cost*</label>
		<br/>
			<input type="text" name="emailid" id="emailid" class="form-control" >
		<small class="text-danger" id="errstatus"></small>
	</div>
</div>					
<div class="col-md-3">
	<div class="form-group">
		<label for="multiselect1">Quantity*</label>
		<br/>
			<input type="text" name="emailid" id="emailid" class="form-control" >
		<small class="text-danger" id="errstatus"></small>
	</div>
</div>			
<div class="col-md-3">
	<div class="form-group">
		<label for="multiselect1">Total*</label>
		<br/>
			<input type="text" name="emailid" id="emailid" class="form-control" >
		<small class="text-danger" id="errstatus"></small>
	</div>
</div>
<div class="col-md-12">
							<!-- ADVANCED VALIDATION -->
								<div class="widget-content">  
<table id="visit-stat-table" class="table table-sorting table-striped table-hover datatable">
				<thead>
					<tr>
						<th>Item Name</th>
						<th>Cost</th>
						<th>Quantity</th>
						<th>Total cost</th>
						<th>Action</th>
					</tr>
				</thead>
</table>                     
								</div>
							<!-- END ADVANCED VALIDATION -->
</div>

                      
                    </form>
                    
						</div>
						
					</div>
					<!-- END DATA EXPORT -->
					
					
										<!-- DATA EXPORT -->
					<div class="widget widget-table">
						<div class="widget-header">
							<h3><i class="fa fa-user"></i> Billing</h3> <em> -Billing Calculation</em>
						</div>
						<div class="widget-content">
<form id="frmmain" name="frmmain" data-parsley-validate novalidate>			
						

						
<div class="col-md-6">
							<!-- ADVANCED VALIDATION -->
								<div class="widget-content">  
                       
                       
                       <div class="form-group">
                            <label for="text-input1">Discount.*</label>
                            <input type="text" name="itemcode" id="itemcode" class="form-control" value="<?php echo e(isset($data) ? $data[0]->itm_code : ''); ?>" onchange="validatecode(this.value)">
                            <small class="text-danger" id="erritemcode"></small>
                        </div>
                        
                        <div class="form-group">
                            <label for="multiselect1">Tax percentage*</label>
                                <select name="itemcategory" id="itemcategory" class="form-control" required onchange="loadsubcat(this.value)">
								<option value="0">-- Select --</option>
                                </select>
                            <small class="text-danger" id="erritemcategory"></small>
							
                        </div> 
                        
                        
                        
                        <div class="form-group">
                            <label for="text-input1">Grand Total.*</label>
                            <input type="text" name="itemcode" id="itemcode" class="form-control" value="<?php echo e(isset($data) ? $data[0]->itm_code : ''); ?>" onchange="validatecode(this.value)">
                            <small class="text-danger" id="erritemcode"></small>
                        </div>
                        
                   
								</div>
							<!-- END ADVANCED VALIDATION -->
</div>
							
<div class="col-md-6">
							<!-- ADVANCED VALIDATION -->
								<div class="widget-content">
                        
                        <div class="form-group">
                            <label>Note (Any note)</label>
                            <textarea class="form-control" name="description" id="description" rows="4" cols="30" ><?php echo e(isset($data) ? $data[0]->itm_note : ''); ?></textarea>
                            <small class="text-danger" id="errdescription" ></small>
                        </div>
                        <div class="form-group">
                            <label for="multiselect1">Status*</label>
                            <br/>
                                <select name="status" id="status" class="form-control" required>
                                    <option value="Active" 
									<?php if(isset($data)): ?>
									<?php if($data[0]->itm_status == "Active"): ?>
										selected='selected' 
									<?php endif; ?>
									<?php endif; ?>
									> Active</option>
                                    <option value="Inactive"
									<?php if(isset($data)): ?>
									<?php if($data[0]->itm_status == "Inactive"): ?>
										selected='selected' 
									<?php endif; ?>
									<?php endif; ?>
									>Inactive</option>
                                </select>
                            <small class="text-danger" id="errstatus"></small>
                        </div>
								</div>
							<!-- END ADVANCED VALIDATION -->
</div>
<div class="col-md-12">
                       <div class="form-group">
                            <center><button type="submit" id="submit" name="submit" class="btn btn-primary">Click Here to Generate Bill</button></center>
                        </div>
</div>                        
                    </form>
                    
						</div>
						
					</div>
					<!-- END DATA EXPORT -->

				</div>
			</div>
			<!-- /main -->
								<script>
					$('.clickme').click(function(e)
					{
						e.preventDefault();
                        $('#sideMenu').load($(this).attr('href'));
					});
					</script>