/
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') !!} --> @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">View Stock 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" @if($current_warehouse == 'Scrap Zone') selected @endif>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"> <thead> <tr> <th>SNo</th> <th>Item Code</th> <th>Item Description</th> <th>HSN Code</th> <th>Product Category</th> <th>Product Type</th> <th>Ware House </th> <th>Zone</th> <th>Engg. Name </th> <th>Bin</th> <th>Qty</th> <th>Rate</th> <th>Value</th> <th>UOM</th> <th>LOT NO</th> <th>Item Type</th> <th>Transaction Type</th> <th>Creation Date</th> <th>Ageing As per Creation Date</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->category}}</td> <td>{{$stock->product_type}}</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(in_array($stock->warehouse, ["SERJNK","SERHMP","SERDEL","SERDel","SERPJB","SERUPE","SUPPNT","SERBHR","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>{{$stock->rate}}</td> <td>{{$stock->qty*$stock->rate}}</td> <td>{{$stock->uom}}</td> <td>{{$stock->lot_no}}</td> <td>{{$stock->type}}</td> <td>{{$stock->transaction_type}}</td> <td>{{$stock->created_at}}</td> <td> @php $date1 = date_create(date('Y-m-d H:i:s')); $date2 = date_create($stock->created_at); $diff = date_diff($date1, $date2); echo $diff->format("%a days"); @endphp </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') !!} <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/view-stock?warehouse="+warehouse+"&action_type="+action_type; window.location.href= url; } } </script> @endpush