/
home
/
sjslayjy
/
public_html
/
mosaram
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title', 'Expense Voucher'); ?> <?php $__env->startSection('style'); ?> <?php echo e(Html::style('assets/css/bootstrap-datepicker3.min.css')); ?> <?php $__env->stopSection(); ?> <?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="#"><?php echo e(__('messages.Home')); ?></a> </li> <li class="active">Expense Voucher</li> </ul> </div> <div class="page-content"> <div class="row"> <form action="<?php echo e(url('/user/dateExpenseVouchers')); ?>" method="POST"> <?php echo e(csrf_field()); ?> <div class="row"> <?php echo e(csrf_field()); ?> <div class="col-md-2"> <div class="form-group"> <label for="from_date">From Date</label> <input type="date" class="form-control date-picker" name="from_date" id="time" value="" placeholder="From Date"> </div> <div class="form-group"> <button type="submit" class="btn btn-primary">Submit</button> </div> </div> </form> </div> <div class="pull-right tableTools-container"></div> <h3 class="header smaller lighter blue">Expense Voucher</h3> <div class="table-header">Total Collection List<span class="badge badge-success"> </div> <div class="table-responsive"> <div class="dataTables_borderWrap"> <table id="dynamic-table" class="table table-striped table-bordered table-hover"> <thead> <tr> <th>Id</th> <th>Create Date</th> <th>Dealer</th> <th>Brand</th> <th>Head</th> <th>Created By</th> <th>Expense By</th> <th>Remarks</th> <th>Approve status</th> <th>Transaction Date</th> <th>Approved By</th> <th>Approve/Decline Remarks</th> <th>Amount</th> <th>Paid Status</th> </tr> </thead> <tbody> <?php if($date_collection_all_not_paid): ?> <?php $__currentLoopData = $date_collection_all_not_paid; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expense_voucher): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($expense_voucher->id); ?></td> <td><?php echo e(date('d-m-Y', strtotime($expense_voucher->created_at))); ?></td> <td><?php echo e(getModelById('Company', $expense_voucher->dealer_id)->name); ?></td> <td><?php echo e(getModelById('Brand', $expense_voucher->brand)->name); ?></td> <td><?php echo e(getModelById('Expense', $expense_voucher->type)->name); ?></td> <td><?php echo e(getModelById('User', $expense_voucher->user_id)->name); ?></td> <td><?php echo e(getModelById('User', $expense_voucher->received_by)->name); ?></td> <td> <?php if($expense_voucher->remark): ?> <?php echo e($expense_voucher->remark); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_status == 0): ?> <span class="badge badge-warning">Pending</span> <?php elseif($expense_voucher->approve_status == 1): ?> <span class="badge badge-success">Approved</span> <?php elseif($expense_voucher->approve_status == 2): ?> <span class="badge badge-danger">Rejected</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->transaction_date): ?> <?php echo date('d-m-Y', strtotime($expense_voucher->transaction_date)); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_date): ?> <?php echo e(getModelById('User', $expense_voucher->approve_user_id)->name); ?><br><?php echo e(date('d-m-Y', strtotime($expense_voucher->approve_date))); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_remark): ?> <?php echo e($expense_voucher->approve_remark); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td><?php echo e($expense_voucher->amount); ?></td> <td> <?php if($expense_voucher->approve_status == 1 && $expense_voucher->paid_status == 0 && session()->get('user_role') == 7): ?> <button class="btn btn-xs btn-primary" data-toggle="tooltip" title="Set Status" onclick="paidStatus(<?php echo e($expense_voucher->id); ?>)">Unpaid</button> <?php elseif($expense_voucher->approve_status == 1 && $expense_voucher->paid_status == 1): ?> <span class="badge badge-success">Paid Successfully</span> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <?php if($date_collection_all_pending): ?> <?php $__currentLoopData = $date_collection_all_pending; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expense_voucher): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($expense_voucher->id); ?></td> <td><?php echo e(date('d-m-Y', strtotime($expense_voucher->created_at))); ?></td> <td><?php echo e(getModelById('Company', $expense_voucher->dealer_id)->name); ?></td> <td><?php echo e(getModelById('Brand', $expense_voucher->brand)->name); ?></td> <td><?php echo e(getModelById('Expense', $expense_voucher->type)->name); ?></td> <td><?php echo e(getModelById('User', $expense_voucher->user_id)->name); ?></td> <td><?php echo e(getModelById('User', $expense_voucher->received_by)->name); ?></td> <td> <?php if($expense_voucher->remark): ?> <?php echo e($expense_voucher->remark); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_status == 0): ?> <span class="badge badge-warning">Pending</span> <?php elseif($expense_voucher->approve_status == 1): ?> <span class="badge badge-success">Approved</span> <?php elseif($expense_voucher->approve_status == 2): ?> <span class="badge badge-danger">Rejected</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->transaction_date): ?> <?php echo date('d-m-Y', strtotime($expense_voucher->transaction_date)); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_date): ?> <?php echo e(getModelById('User', $expense_voucher->approve_user_id)->name); ?><br><?php echo e(date('d-m-Y', strtotime($expense_voucher->approve_date))); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_remark): ?> <?php echo e($expense_voucher->approve_remark); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td><?php echo e($expense_voucher->amount); ?></td> <td> <?php if($expense_voucher->approve_status == 1 && $expense_voucher->paid_status == 0 && session()->get('user_role') == 7): ?> <button class="btn btn-xs btn-primary" data-toggle="tooltip" title="Set Status" onclick="paidStatus(<?php echo e($expense_voucher->id); ?>)">Unpaid</button> <?php elseif($expense_voucher->approve_status == 1 && $expense_voucher->paid_status == 1): ?> <span class="badge badge-success">Paid Successfully</span> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <?php if($date_collection_completed): ?> <?php $__currentLoopData = $date_collection_completed; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expense_voucher): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($expense_voucher->id); ?></td> <td><?php echo e(date('d-m-Y', strtotime($expense_voucher->created_at))); ?></td> <td><?php echo e(getModelById('Company', $expense_voucher->dealer_id)->name); ?></td> <td><?php echo e(getModelById('Brand', $expense_voucher->brand)->name); ?></td> <td><?php echo e(getModelById('Expense', $expense_voucher->type)->name); ?></td> <td><?php echo e(getModelById('User', $expense_voucher->user_id)->name); ?></td> <td><?php echo e(getModelById('User', $expense_voucher->received_by)->name); ?></td> <td> <?php if($expense_voucher->remark): ?> <?php echo e($expense_voucher->remark); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_status == 0): ?> <span class="badge badge-warning">Pending</span> <?php elseif($expense_voucher->approve_status == 1): ?> <span class="badge badge-success">Approved</span> <?php elseif($expense_voucher->approve_status == 2): ?> <span class="badge badge-danger">Rejected</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->transaction_date): ?> <?php echo date('d-m-Y', strtotime($expense_voucher->transaction_date)); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_date): ?> <?php echo e(getModelById('User', $expense_voucher->approve_user_id)->name); ?><br><?php echo e(date('d-m-Y', strtotime($expense_voucher->approve_date))); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td> <?php if($expense_voucher->approve_remark): ?> <?php echo e($expense_voucher->approve_remark); ?> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> <td><?php echo e($expense_voucher->amount); ?></td> <td> <?php if($expense_voucher->approve_status == 1 && $expense_voucher->paid_status == 0 && session()->get('user_role') == 7): ?> <button class="btn btn-xs btn-primary" data-toggle="tooltip" title="Set Status" onclick="paidStatus(<?php echo e($expense_voucher->id); ?>)">Unpaid</button> <?php elseif($expense_voucher->approve_status == 1 && $expense_voucher->paid_status == 1): ?> <span class="badge badge-success">Paid Successfully</span> <?php else: ?> <span class="d-flex justify-content-center">......</span> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td> <b>Total = </b> <b><?php echo e($date_total_collection); ?></b></td> <td></td> </tr> </tbody> </table> </div> </div> </div> </div><!-- /.page-content --> </div> </div><!-- /.main-content --> <?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')); ?> <?php echo e(Html::script('assets/js/bootstrap-datepicker.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 paidStatus(id) { console.log(id); if (id == "") { swal('Error', 'Id is missing', 'warning'); } else { swal({ title: "Are you sure to Paid", // text: "You will not be able to recover this Bank!", type: "warning", showCancelButton: true, confirmButtonColor: '#DD6B55', confirmButtonText: 'Yes, I am sure!', cancelButtonText: "No, cancel it!", closeOnConfirm: false, closeOnCancel: false }, function(isConfirm) { if (isConfirm) { $.ajax({ url: "/user/expense-voucher-paid-status/" + id, type: 'GET', success: function(data) { if (data.flag == false) { swal({ title: "Error", text: data.message, type: "warning" }, function() { window.location.reload(); }); } else { swal({ title: "Success!", text: data.message, type: "success" }, function() { window.location.reload(); }); } } }); } else { swal("Cancelled", "Not Paid", "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(); // }); // } // } // }); // } </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 /home3/pmmsanvp/public_html/sarojMain/resources/views/dashboard/invoice/expense-voucher.blade.php ENDPATH**/ ?>