/
home
/
sjslayjy
/
public_html
/
assets
/
resources
/
views
/
circle-store
/
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-9"> <h4 class="card-title">List Of Goods Receipt Notes </h4> </div> <div class="col-lg-3"> <select class="form-control mr" id="warehouse" onchange="get_grn_of_warehouse(this)"> <option value=""> -- Select Warehouse --</option> <option value="all">All</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 </select> </div> </div> <div class="table-responsive"> <table class="table table-striped myTable"> <thead> <tr> <th> GR No </th> <th> Reference No </th> <th> Invoice No </th> <th> Invoice Date </th> <th style="float: right;"> Amount </th> <th> Satus </th> <th> action </th> </tr> </thead> <tbody id="grn_list"> @foreach($all_grn as $grn) <tr> <td class="font-weight-medium">{{$grn->grn_no}}</td> <td>{{$grn->reference_number}}</td> <td>{{$grn->invoice_number}}</td> <td>{{$grn->invoice_date}}</td> <td style="float: right;">{{$grn->grand_total}} Rs</td> <td> <label class="badge badge-danger"></label> </td> <td><a href="{{url('circle-store/view-grn/'.$grn->id)}}">View</a> | <a target="_blank" href="{{url('circle-store/print-grn/'.$grn->id)}}">Print Note</a></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 get_grn_of_warehouse(t) { var warehouse = $(t).val(); var url = window.location.origin+"/circle-store/get-grn-of-warehouse" var data = {}; data._token = "{{ csrf_token() }}"; data.warehouse = warehouse; // $('#loaderAction').show(); $.ajax({ type: "POST", url: url, data: data, success:function(res){ //console.log(res); if(res.success == true){ var html = ""; $.each(res.grns,function(k,grn){ html +=`<tr> <td class="font-weight-medium">`+grn.grn_no+`</td> <td>`+grn.reference_number+`</td> <td>`+grn.invoice_number+`</td> <td>`+grn.invoice_date+`</td> <td style="float: right;">`+grn.grand_total+` Rs</td> <td> <label class="badge badge-danger"></label> </td> <td><a href="`+window.location.origin+`/circle-store/print-grn/`+grn.id+`">Print Note</a></td> </tr>`; }); $('#grn_list').html(html); // $('.myTable').DataTable(); }else{ swal(res.msg, { icon: "error", }); } // $('#loaderAction').hide(); }, error:function(error){ console.log(error); }, dataType: 'json' }); } </script> @endpush