/
home
/
sjslayjy
/
public_html
/
scm
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','All Goods Receipt Notes'); ?> <?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">Goods Receipt Notes</li> </ul> </div> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <h3 class="header smaller lighter blue">Goods Receipt Notes</h3> <div class="clearfix"> <div class="pull-right tableTools-container"> </div> </div> <div class="table-header" style="height:50px;"> Results for "Latest Added Goods Receipt Notes" </div> <!-- div.table-responsive --> <!-- div.dataTables_borderWrap --> <div> <!-- div.dataTables_borderWrap --> <div> <div style="display: flex; justify-content: space-between; align-items: center; padding: 0 10px; background-color:#EFF3F8"> <form method="GET" action="<?php echo e(url()->current()); ?>" id="recordsPerPageForm" style="margin-right: auto;"> <label for="perPage">Display</label> <select name="per_page" id="perPage" onchange="document.getElementById('recordsPerPageForm').submit();"> <option value="10" <?php echo e(request('per_page') == 10 ? 'selected' : ''); ?>>10</option> <option value="50" <?php echo e(request('per_page') == 50 ? 'selected' : ''); ?>>50</option> <option value="100" <?php echo e(request('per_page') == 100 ? 'selected' : ''); ?>>100</option> </select> records </form> <label for="perPage">Search</label> <input type="text" id="search-input-irn" class="pr_search" placeholder="Searching..." style="height:29px; width:150px; margin-left: 20px;"> </div> <table id="dynamic-table" class="table table-striped table-bordered table-hover"> <thead> <tr> <th>S.No</th> <th>GRN Number</th> <th>Receive Date</th> <th>Invoice Number</th> <th>Invoice Date</th> <th>Payment Date</th> <th>PO Number</th> <th>GRN Status</th> <th>Generated From</th> <th>Vendor Name</th> <th>Invoice Copy</th> <th>Quality Status</th> <th>Payment Status</th> <!-- <th>Status Action</th> --> <th>Action</th> </tr> </thead> <tbody> <?php $startingNumber = ($irns->currentPage() - 1) * $irns->perPage() + 1; ?> <?php $__currentLoopData = $irns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $irn): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $arr = []; if (substr_count(getPRIdByPONumber($irn->id), ",") > 0) { $arr = explode(',', getPRIdByPONumber($irn->id)); } else { $arr[] = getPRIdByPONumber($irn->id); } ?> <tr id="tr_<?php echo e($irn->id); ?>"> <td><?php echo e($startingNumber++); ?></td> <td><?php echo e($irn->irn_no); ?></td> <td><?php echo e($irn->receive_date); ?></td> <td><?php echo e($irn->invoice_no); ?></td> <td><?php echo e($irn->invoice_date); ?></td> <td><?php echo e($irn->payment_date); ?></td> <td><?php echo e($irn->po_number); ?></td> <td> <?php if(getMRNStatus($irn->po_id) == 1): ?> <span class="badge badge-success" title="Done">Done</span> <?php elseif(getMRNStatus($irn->po_id) == 2): ?> <span class="badge badge-warning" title="Partially Done">Partially Done</span> <?php elseif(getMRNStatus($irn->po_id) == 3): ?> <span class="badge badge-danger" title="Not Done">Not Done</span> <?php endif; ?> </td> <td> <?php if($irn->generated_by == 1): ?> <span class="badge" title="SCM">SCM</span> <?php else: ?> <span class="badge" title="ASSET">ASSET</span> <?php endif; ?> </td> <td><?php echo e(getModelById('Vendor', $irn->vendor_id)->vendor_name); ?></td> <td style="text-align:center; padding-top:50px;"> <?php if($irn->document == true): ?> <?php $url = ($irn->generated_by == 2)?'http://asset.aerialtelecom.in/'.$irn->document:'http://scm.aerialtelecom.in'.$irn->document; ?> <a href="<?php echo e($url); ?>" target="_blank" title="" class=""><i class="fa fa-file-pdf-o fa-lg" aria-hidden="true"></i></a> <?php else: ?> <p style="color: red;">Document Not Avilable</p> <?php endif; ?> </td> <td> <?php if($irn->status == 'Approved'): ?> <span class="badge badge-success"><?php echo e($irn->status); ?></span> <?php elseif($irn->status == 'rejected'): ?> <span class="badge badge-danger"><?php echo e($irn->status); ?></span> <?php endif; ?> </td> <td> <?php if($irn->payment_status == 'Payment_done'): ?> <span class="badge badge-success"><?php echo e($irn->payment_status); ?></span> <?php elseif($irn->payment_status == 'Payment_on_hold'): ?> <span class="badge badge-warning"><?php echo e($irn->payment_status); ?></span> <?php elseif($irn->payment_status == 'Partially_payment_done'): ?> <span class="badge badge-info"><?php echo e($irn->payment_status); ?></span> <?php endif; ?> </td> <td> <div class="hidden-sm hidden-xs btn-group"> <a class="btn btn-xs btn-warning" href="<?php echo e(url('/user/irn-view/'.$irn->id)); ?>" title="View GRN" onclick="viewPr(<?php echo e($irn->id); ?>)" > <i class="ace-icon fa fa-eye bigger-120"></i> </a> </div> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> <?php echo e($irns->appends(['per_page' => request('per_page')])->links('pagination')); ?> </div> </div> </div> </div><!-- /.page-content --> </div> </div><!-- /.main-content --> <div class="modal fade" id="editItemModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Update Item</h4> </div> <div class="modal-body" id="EditBodyItem"> </div> </div> </div> </div> <div class="modal fade" id="historyModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">History</h4> </div> <div class="modal-body" id="genrateHistory"> </div> </div> </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 for IRNS, following the PR code structure var myTable = $('#dynamic-table').DataTable({ bAutoWidth: false, paging: false, // Custom pagination in use, similar to PR searching: false, // Custom search in use, similar to PR "aaSorting": [], // Disable initial sorting dom: 'Bfrtip', // Enable button functionalities info: false, // Disable the "Showing 1 to X of Y entries" text 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' } ] }); // Append buttons to the container myTable.buttons().container().appendTo($('.tableTools-container')); // Style the copy 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'); }); // Customize the column visibility dropdown 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 setStatusModal(id){ if(id == ""){ swal('Error','GRN id is missing','warning'); }else{ $.ajax({ url: "/user/set-mrn-status/"+id, type: 'GET', success:function(data){ // console.log(data); $('#EditBodyItem').html(data); $('#editItemModal').modal('toggle'); // OnLoad(); } }); } } function viewPr(id){ if(id == ""){ swal('Error','PR id is missing','warning'); }else{ $('#pr_details_view').modal('toggle'); // $.ajax({ // url: "/user/set-status/"+id, // type: 'GET', // success:function(data){ // // console.log(data); // $('#EditBodyItem').html(data); // $('#editItemModal').modal('toggle'); // // OnLoad(); // } // }); } } // function setStaus(id) { // // alert(id); // $id = $('#id_'+id).val(); // $status = $('#status_'+id).val(); // if ($status != '') { // $.ajax({ // type: "POST", // url: "/user/set-purchase-request-status", // data: { // "status" : $status, // "id" : $id, // "_token": "<?php echo e(csrf_token()); ?>", // }, // success: function (response) { // swal('Success','Purchase Request Status Updated Successfully !','success'); // window.location.reload(); // }, // error: function (error) { // swal('Warning','Oops something went wrong !', 'warning'); // } // }); // } else { // swal('Error','Please Select Status First !', 'error'); // } // } function updateStatus(){ $status = $('#status').val(); $remark = $('#remark').val(); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') } }); $.ajax({ url: $('#editStatusForm').attr('action'), method: 'POST', data: $('#editStatusForm').serialize(), success: function(data){ // console.log(data); if(!data.flag){ showError('edit_status_error',data.errors.status); }else{ $('#editItemModal').modal('hide'); swal({ title: "Success!", text: data.message, type: "success" }, function() { window.location.reload(); }); } } }); } function showError(id,error){ if(typeof(error) === "undefined"){ $('#'+id).hide(); }else{ $('#'+id).show(); $('#'+id).text(error); } } // function viewHistoryModal(id){ // if(id == ""){ // swal('Error','PR id is missing','warning'); // }else{ // $.ajax({ // url: "/user/view-po-history/"+id, // type: 'GET', // success:function(data){ // // console.log(data); // $('#genrateHistory').html(data); // $('#historyModal').modal('toggle'); // // OnLoad(); // } // }); // } // } </script> <script> $(document).ready(function() { $('#search-input-irn').on('keyup', function() { var query = $(this).val().trim(); if (query === '') { window.location.href = window.location.href; } else { $.ajax({ url: '<?php echo e(route("searchIrn")); ?>', type: 'GET', data: {'query': query}, success: function(data) { if (data.trim() !== '') { $('tbody').html(data); } else { $('tbody').html('<tr><td colspan="12" class="text-center">No Matching Record Found!</td></tr>'); } }, error: function() { $('tbody').html('<tr><td colspan="12" class="text-center">Error while fetching data!</td></tr>'); } }); } }); }); </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/scm/resources/views/dashboard/po/all-irn.blade.php ENDPATH**/ ?>