IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<!--<div class="card">-->
<div class="body">
<button class="btn btn-raised btn-warning btn-round waves-effect" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">Advance Search</button>
<div class="collapse" id="collapseExample">
<div class="well">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Stock Report</strong></h2>
</div>
<div class="body">
<?php echo Form::open(['method' => 'GET', 'action' => ['School\Stock\StockReportController@stockReport'], 'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-2 form-control-label">
<label for="classname">Product Category</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idProductCategory',$categories,null,['class' => 'form-control show-tick ms']); ?>
</div>
</div>
<div class="col-sm-2 form-control-label required">
<label for="classname">Product</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<div id="idProduct" style="border:1px solid #ccc; width:250px; height: 150px; overflow-y: scroll;">
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-2 form-control-label">
<label for="classname">Financial Year</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('idFinancialYear',fys(),null,['class' => 'form-control show-tick ms']); ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8 offset-sm-2">
<?php echo Form::submit('Search',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--</div>-->
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Stock Report </strong></h2>
</div>
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover dataTable js-exportable">
<thead>
<tr>
<th>S. No.</th>
<th>Photo</th>
<th>Product Name</th>
<th>Category</th>
<th>Opening Unit</th>
<th>Total Purchase</th>
<th>Purchase Return</th>
<th>Total Sell</th>
<th>Stock in Hand</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<th scope="row"><?php echo e($i); ?></th>
<td></td>
<td><?php echo e($var->productName); ?></td>
<td><?php echo e($var->categoryName); ?></td>
<td><?php echo e($var->opngStock); ?></td>
<td><?php echo e($var->purchaseQuantity); ?></td>
<td><?php echo e($var->returnedQuantity); ?></td>
<th><?php echo e($var->totalSell); ?></th>
<td><?php echo e($var->quantityInStock); ?></td>
<td>
<?php if($var->quantityInStock > 0): ?>
<span style="font-weight: bold;color:green;">In-Stock</span>
<?php else: ?>
<span style="font-weight: bold;color:red;">Out Of Stock</span>
<?php endif; ?>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).ready(function() {
$('select[name="idProductCategory"]').on('change', function() {
var categoryID = $(this).val();
if(categoryID!='All') {
$.ajax({
url: "<?php echo e(url('/school/product-category')); ?>"+'/' +categoryID + "/products",
type: "GET",
dataType: "json",
success:function(data) {
$('#idProduct').empty();
$('#idProduct').append('<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;"><label style="margin-right:42px;"><strong>Select All</label></strong><input type="checkbox" class="select-all" id="selectall"></div>');
$.each(data, function(key, value) {
$('#idProduct').append('<div class="checkbox-inline" style="padding-left:10px;"><label style="margin-right:100px;">'+value+'</label><input type="checkbox" name="products[]" value="'+key+'" class="productclass"></div>');
});
}
});
}else{
$('select[name="idProduct"]').empty();
}
});
});
$(document).on('click', '.select-all', function(){
var checkAll = this.checked;
if(checkAll === true){
$('input[type=checkbox]').each(function () {
this.checked = checkAll;
});
}else{
$('input[type=checkbox]').each(function () {
this.checked = checkAll;
});
}
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -