/
home
/
sjslayjy
/
public_html
/
assets
/
resources
/
views
/
circle-store
/
reports
/
Upload File
HOME
@extends('layout.master') @push('plugin-styles') <!-- {!! Html::style('/assets/plugins/plugin.css') !!} --> {!! Html::style('//cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css') !!} <style type="text/css"> .table th, .table td { white-space: break-spaces !important; } .table-responsive{ margin: 20px 0; } </style> @endpush @section('content') <div class="row"> <div class="col-lg-12 grid-margin"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-lg-2"> <h4 class="card-title">Stock Summery Report</h4> </div> <div class="col-lg-2"> <small>Warehouse</small> <select class="form-control mr" id="warehouse" onchange="get_ware_house(this)"> <option value=""> -- Select Warehouse --</option> @foreach($warehouses as $warehouse) <option value="{{$warehouse}}" {{$current_warehouse ==$warehouse ? 'selected':''}}>{{$warehouse}}</option> @endforeach <!-- @if($userInfo->fieldUserCodes == 'PNT') <option value="SUPPNT">SUPPNT</option> @endif --> <!-- <option value="Scrap Zone" {{$current_warehouse == 'Scrap Zone' ? 'selected':''}}>Scrap Zone</option> --> </select> </div> <div class="col-lg-2"> <small>Action Type</small> <select class="form-control mr" name="action_type" id="action_type"> <option value="search">Search</option> <option value="export">Export In Excel</option> </select> </div> <div class="col-lg-1"> <a href="#" style="margin-top: 25px;" class="btn brn-sm btn-info" onclick="submit_now()">Submit</a> </div> </div> </div> </div> </div> <div class="col-lg-12 grid-margin"> <div class="card"> <div class="card-body"> <div class="table-responsive"> <table class="table table-striped myTable"> <thead> <tr> <th>SNo</th> <th>Item Code</th> <th>Item Description</th> <th>HSN Code</th> <th>Ware House</th> <th>Zone</th> <th>Engg. Name </th> @if($user_type == 2) <th>Site Eng. Id</th> <th>Site Eng. Name</th> @endif <th>Bin</th> <th>Qty</th> <th>Value</th> <th>UOM</th> <th>Item Type</th> </tr> </thead> <tbody> @foreach($stocks as $key => $stock) <tr> <td>{{$key+1}}</td> <td>{{$stock->spare_code}}</td> <td>{{$stock->description}}</td> <td>{{$stock->hsn}}</td> <td>{{$stock->warehouse}}</td> <td>@if($stock->zone == 'ENG') {{$stock->engineer_id}} @else {{strtoupper($stock->zone)}} @endif</td> <td>@if($stock->zone == 'PT') PULL THROUGH @elseif( $stock->zone == 'TRC') REPAIRED ITEMS @elseif( $stock->zone == 'ENG') {{$stock->StaffName}} @else {{strtoupper($stock->item_type)}} SPARES ZONE @endif</td> @if($user_type == 2) <td>{{$stock->Eng_code ?? ''}}</td> <td>{{$stock->eng_name ?? ''}}</td> @endif @if(in_array($stock->warehouse, ["SERJNK","SERHMP","SERDel","SERDEL","SERPJB","SERUPE","SERBHR","SEPPNT","SERNOE","SERASM","SERWBL","SERORI","SERMPD","SERMAH","SERKTK","SERKRL","SERTMN","SERTGN","SERUPW","SERAPD","SERJHR","INDIMEBAY","INDIMENND","INDIMEBAT","INDIMEASR","INDIMEPTL","INDIMEFZP","INDIMEHSP","SERPNT", "SUPPNT", "SERHAR", "SERRAJ","TNLO&MDEL","ATCO&MDEL","TVIO&MDEL"])) <td>{{strtoupper($stock->item_type)}}</td> @elseif($stock->warehouse == "Scrap Zone") <td>{{$stock->scrap_bin}}</td> @else <td></td> @endif <td>{{$stock->qty}}</td> <td>{{ number_format($stock->total_value, 2) }}</td> <td>{{$stock->uom}}</td> <td>{{$stock->type}}</td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> @endsection @push('plugin-scripts') {!! Html::script('/assets/plugins/chartjs/chart.min.js') !!} {!! Html::script('/assets/plugins/jquery-sparkline/jquery.sparkline.min.js') !!} @endpush @push('custom-scripts') {!! Html::script('/assets/js/dashboard.js') !!} {!! Html::script('//cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js') !!} <script type="text/javascript"> $(document).ready( function () { $('.myTable').DataTable(); } ); </script> <script type="text/javascript"> function submit_now() { var warehouse = $('#warehouse').val(); var action_type = $('#action_type').val(); if(warehouse == ""){ swal('Please Select the warehouse', { icon: "error", }); }else{ var url = window.location.origin+"/circle-store/stock-summery?warehouse="+warehouse+"&action_type="+action_type; window.location.href= url; } } </script> @endpush