/
home
/
sjslayjy
/
public_html
/
tabson
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','Store Stock'); ?> <?php $__env->startSection('content'); ?> <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <li> <i class="ace-icon fa fa-home home-icon"></i> <a href="#">Home</a> </li> <li class="active">Stock Details</li> </ul> </div> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <h3 class="header smaller lighter blue">Stock Details</h3> <div class="col-xs-2"> <select class="form-control mr select2" onchange="get_spare_of_warehouse(this)"> <option disabled selected>-- Select Warehouse --</option> <?php $__currentLoopData = $warehouses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warehouse): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($warehouse); ?>" <?php echo e($current_warehouse == $warehouse ? 'selected' : ''); ?>> <?php echo e($warehouse); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="clearfix"> <div class="pull-right tableTools-container"> </div> </div> <div> <div class="row"> <div class="col-lg-12"> <ul class="nav nav-tabs" id="myTab" role="tablist"> <li class="nav-item waves-effect waves-light"> <a class="nav-link active" id="fresh_qty" data-toggle="tab" href="#fresh" role="tab" aria-controls="fresh" aria-selected="false">Fresh Spares</a> </li> <li class="nav-item waves-effect waves-light"> <a class="nav-link" id="scrap_qty" data-toggle="tab" href="#scrap" role="tab" aria-controls="scrap" aria-selected="false">Scrap Spares</a> </li> </ul> <div class="tab-content" id="myTabContent"> <div class="tab-pane fade show active" id="fresh" role="tabpanel" aria-labelledby="fresh_qty"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover table myTable"> <thead> <tr> <th>Item Code</th> <th>Item Description</th> <th>Qty</th> <th>JW Assigned Qty</th> <th>Rate</th> <th>Fresh Value</th> </tr> </thead> <tbody> <?php $__currentLoopData = $fresh_stocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $fresh_stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $jw_stock_qty = isset($jw_stocks_map[$fresh_stock->spare_code]) ? $jw_stocks_map[$fresh_stock->spare_code]->available_qty : 0; ?> <tr> <td><?php echo e($fresh_stock->spare_code); ?></td> <td><?php echo e($fresh_stock->description); ?></td> <td><?php echo e($fresh_stock->available_qty); ?></td> <td><?php echo e($jw_stock_qty); ?></td> <td><?php echo e($fresh_stock->rate ?? 'N/A'); ?></td> <td><?php echo e(($fresh_stock->rate ?? 0) * $fresh_stock->available_qty); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> <div class="tab-pane" id="scrap" role="tabpanel" aria-labelledby="scrap_qty"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover table myTable"> <thead> <tr> <th>Item Code</th> <th>Item Description</th> <th>Qty</th> <th>Rate</th> <th>Repaired Value</th> </tr> </thead> <tbody> <?php $__currentLoopData = $scrap_stocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $scrap_stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td> <?php echo e($scrap_stock->spare_code); ?> </td> <td ><?php echo e($scrap_stock->description); ?></td> <td> <?php echo e($scrap_stock->available_qty); ?></td> <td> <?php echo e($scrap_stock->rate); ?></td> <td> <?php echo e($scrap_stock->rate*$scrap_stock->available_qty); ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div><!-- /.page-content --> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <h3 class="header smaller lighter blue">Details Stock Summery</h3> <div class="clearfix"> <div class="pull-right tableTools-container"> </div> </div> <div> <table class="table table-striped table-bordered table-hover myTable"> <thead> <tr> <th> Item Code </th> <th> Item Description </th> <th> Fresh</th> <th> Scrap </th> <th> JW Assigned Qty </th> <th> Total </th> </tr> </thead> <tbody id="stock_list"> <?php $__currentLoopData = $stocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $part_in_stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $jw_stock_quantity = isset($jw_stocks_map[$part_in_stock->spare_code]) ? $jw_stocks_map[$part_in_stock->spare_code]->available_qty : 0; ?> <tr> <td class="font-weight-medium"><?php echo e($part_in_stock->spare_code); ?></td> <td ><?php echo e($part_in_stock->description); ?></td> <td><label class="badge badge-success"><?php echo e($part_in_stock->fresh_qty); ?></label></td> <td><label class="badge badge-warning"><?php echo e($part_in_stock->scrap_qty); ?></label></td> <td><label class="badge badge-warning"><?php echo e($jw_stock_quantity); ?></label></td> <td style="text-align: right !important;"><?php echo e($part_in_stock->fresh_qty + $part_in_stock->scrap_qty + $jw_stock_quantity); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div><!-- /.page-content --> </div> </div> <?php $__env->startSection('script'); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.min.js")); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.bootstrap.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.buttons.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.flash.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.html5.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.print.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.colVis.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.select.min.js")); ?> <?php echo e(Html::script("assets/js/ace-elements.min.js")); ?> <?php echo e(Html::script("assets/js/ace.min.js")); ?> <script type="text/javascript"> jQuery(function($) { //initiate dataTables plugin var myTable = $('.myTable').DataTable({ bAutoWidth: false, "aaSorting": [], }); $.fn.dataTable.Buttons.defaults.dom.container.className = 'dt-buttons btn-overlap btn-group btn-overlap'; new $.fn.dataTable.Buttons(myTable, { buttons: [{ "extend": "colvis", "text": "<i class='fa fa-search bigger-110 blue'></i> <span class='hidden'>Show/hide columns</span>", "className": "btn btn-white btn-primary btn-bold", columns: ':not(:first):not(:last)' }, { "extend": "copy", "text": "<i class='fa fa-copy bigger-110 pink'></i> <span class='hidden'>Copy to clipboard</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "csv", "text": "<i class='fa fa-database bigger-110 orange'></i> <span class='hidden'>Export to CSV</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "excel", "text": "<i class='fa fa-file-excel-o bigger-110 green'></i> <span class='hidden'>Export to Excel</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "pdf", "text": "<i class='fa fa-file-pdf-o bigger-110 red'></i> <span class='hidden'>Export to PDF</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "print", "text": "<i class='fa fa-print bigger-110 grey'></i> <span class='hidden'>Print</span>", "className": "btn btn-white btn-primary btn-bold", autoPrint: false, message: 'This print was produced using the Print button for DataTables' } ] }); myTable.buttons().container().appendTo($('.tableTools-container')); //style the message box var defaultCopyAction = myTable.button(1).action(); myTable.button(1).action(function(e, dt, button, config) { defaultCopyAction(e, dt, button, config); $('.dt-button-info').addClass('gritter-item-wrapper gritter-info gritter-center white'); }); var defaultColvisAction = myTable.button(0).action(); myTable.button(0).action(function(e, dt, button, config) { defaultColvisAction(e, dt, button, config); if ($('.dt-button-collection > .dropdown-menu').length == 0) { $('.dt-button-collection') .wrapInner('<ul class="dropdown-menu dropdown-light dropdown-caret dropdown-caret" />') .find('a').attr('href', '#').wrap("<li />") } $('.dt-button-collection').appendTo('.tableTools-container .dt-buttons') }); }); function get_spare_of_warehouse(t) { var warehouse = $(t).val(); console.log('Warehouse is', warehouse); var url = window.location.origin+'/user/store-stock/?circle='+warehouse; window.location.replace(url); } </script> <script> $(document).ready(function() { $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { let target = $(e.target).attr("href"); // e.g. #repaired $('.tab-pane').removeClass('show active'); // reset $(target).addClass('show active'); // set correct }); }); </script> <script> $(document).ready(function() { // Initialize Select2 with custom placeholder and no cross sign $('.select2').select2({ placeholder: 'Search Warehouses', // Custom placeholder text allowClear: false, // Remove the cross (clear) sign language: { noResults: function() { return '<span class="no-results">No results found!</span>'; } }, escapeMarkup: function (markup) { return markup; // Allows HTML markup to be rendered } }); }); </script> <script> $(document).ready(function () { $('#myTab a[href="#fresh"]').tab('show'); // Force activate Fresh tab }); </script> <?php $__env->stopSection(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('dashboard.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/sjslayjy/public_html/tabson/resources/views/dashboard/stock/all-stock.blade.php ENDPATH**/ ?>