/
home
/
sjslayjy
/
public_html
/
scm
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','Finance'); ?> <?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">Finance</li> </ul> </div> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <h3 class="header smaller lighter blue">Finance</h3> <div class="clearfix"> <div class="pull-right tableTools-container"> </div> </div> <div class="table-header"> Results for "Latest Added Finance" </div> <!-- div.table-responsive --> <!-- div.dataTables_borderWrap --> <div> <table id="dynamic-table" class="table table-striped table-bordered table-hover"> <thead> <tr> <th>S.No</th> <th>MRN Number</th> <th>Receive Date</th> <th>Invoice Number</th> <th>Invoice Date</th> <th>Invoice Value</th> <th>Due Date</th> <th>Due Day</th> <th>PO Number</th> <th>Vendor Name</th> <th>Invoice Copy</th> <th>Payment Status</th> <!-- <th>Status Action</th> --> <th>Payment Action</th> </tr> </thead> <tbody> <?php $__currentLoopData = $irns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $irn): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($irn->id); ?>"> <td><?php echo e($irn->id); ?></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->invoice_amount); ?></td> <td><?php echo e($irn->payment_date); ?></td> <?php if($irn->diffday<=0): ?> <td style="color:red;"><?php echo e($irn->diffday); ?></td> <?php else: ?> <td>-</td> <?php endif; ?> <td><?php echo e($irn->po_number); ?></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): ?> <a href="<?php echo e(URL::to($irn->document)); ?>" 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->payment_status == 'Payment_done'): ?> <p><span class="badge badge-success"><?php echo e($irn->payment_status); ?></span></p> <?php elseif($irn->payment_status == 'Payment_on_hold'): ?> <p><span class="badge badge-warning"><?php echo e($irn->payment_status); ?></span></p> <?php elseif($irn->payment_status == 'Partially_payment_done'): ?> <p></p><span class="badge badge-info"><?php echo e($irn->payment_status); ?></span></p> <?php else: ?> <span class="badge badge-danger">Payment Not Done</span> <?php endif; ?> </td> <!-- <td> <?php if($irn->status == 'requested'): ?> <span class="badge badge-info"><?php echo e($irn->status); ?></span> <?php elseif($irn->status == 'Checked'): ?> <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> <button class="btn btn-xs btn-info" data-toggle="tooltip" title="Set Status" onclick="setPaymentStatusModal(<?php echo e($irn->id); ?>)" > PaymentAction </button> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </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" id="payment-model-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 var myTable = $('#dynamic-table').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 setPaymentStatusModal(id){ if(id == ""){ swal('Error','MRN id is missing','warning'); }else{ $.ajax({ url: "/user/set-payment-status/"+id, type: 'GET', success:function(data){ console.log(data); $('#EditBodyItem').html(data); $('#editItemModal').modal('toggle'); // OnLoad(); } }); } } $(document).ready(function(){ alert(efgedfgv); $("#paymentStatusForm").on('submit',(function(e) { e.preventDefault(); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') } }); $.ajax({ url: $('#paymentStatusForm').attr('action'), method: 'POST', //data: $('#addVendorForm').serialize(), data: new FormData(this), contentType: false, cache: false, processData:false, success: function(data){ if(!data.flag){ $.each(data.errors, function(key,val) { showError('add_'+key+'_error',val); }); }else{ swal({ title: "Success!", text: data.message, type: "success" }, function() { //window.location.reload(); }); } } }); })); }); 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> <?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/finance/all-payment.blade.php ENDPATH**/ ?>