/
home
/
sjslayjy
/
public_html
/
tabson_test
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','All Quotation'); ?> <?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">Supplier Quotations</li> </ul> </div> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <h3 class="header smaller lighter blue">Supplier Quotations</h3> <div class="clearfix"> <div class="pull-right tableTools-container"> </div> </div> <div class="table-header"> Results for "Latest Added Supplier Quotations" </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>Quotation Date</th> <th>Quotation Number</th> <th>PR Number</th> <th>Vendor Name</th> <th>Quotation Status</th> <th>PO Status</th> <th>Action</th> </tr> </thead> <tbody style="text-align: center;"> <?php $__currentLoopData = $all_quotations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$quotation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($quotation->id); ?>"> <td><?php echo e($quotation->id); ?></td> <td><?php echo e(date("d-m-Y", strtotime($quotation->quotation_date))); ?></td> <td><?php echo e($quotation->quotation_number); ?></td> <td><?php echo e($quotation->pr_number); ?></td> <td><?php echo e($quotation->vendor_name); ?></td> <td> <?php if($quotation->quotation_status == 'requested'): ?> <span class="badge badge-primary" title="Quotation Status"><?php echo e($quotation->quotation_status); ?></span> <?php elseif($quotation->quotation_status == 'rejected'): ?> <span class="badge badge-danger" title="Quotation Status"><?php echo e($quotation->quotation_status); ?></span> <?php elseif($quotation->quotation_status == 'accepted'): ?> <span class="badge badge-warning" title="Quotation Status"><?php echo e($quotation->quotation_status); ?></span> <?php endif; ?> </td> <td> <?php if($quotation->po_status == 'requested'): ?> <span class="badge badge-primary" title="Quotation Status"><?php echo e($quotation->po_status); ?></span> <?php elseif($quotation->po_status == 'rejected'): ?> <span class="badge badge-danger" title="Quotation Status"><?php echo e($quotation->po_status); ?></span> <?php elseif($quotation->po_status == 'partial_completed'): ?> <span class="badge badge-warning" title="Quotation Status"><?php echo e($quotation->po_status); ?></span> <?php elseif($quotation->po_status == 'completed'): ?> <span class="badge badge-warning" title="Quotation Status"><?php echo e($quotation->po_status); ?></span> <?php elseif($quotation->po_status == 'terminated'): ?> <span class="badge badge-warning" title="Quotation Status"><?php echo e($quotation->po_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/quotation-view/'.$quotation->id)); ?>" title="View Quotation" onclick="viewPr(<?php echo e($quotation->id); ?>)" > <i class="ace-icon fa fa-eye bigger-120"></i> </a> <?php if($quotation->quotation_status == 'requested'): ?> <a href="<?php echo e(url('/user/supplier-quotation/edit-quotation/'.$quotation->id)); ?>" class="btn btn-xs btn-info" title="Edit Quotation" onclick="getEdit(<?php echo e($quotation->id); ?>)" > <i class="ace-icon fa fa-pencil bigger-120"></i> </a> <button class="btn btn-xs btn-primary" data-toggle="tooltip" title="Quotation Status" onclick="viewHistoryModal(<?php echo e($quotation->sqd_id); ?>)" > <i class="ace-icon fa fa-history bigger-120"></i></a> </button> <?php endif; ?> <?php if(($quotation->quotation_status == 'accepted') && ($quotation->po_status == 'partial_completed' || $quotation->po_status == 'requested')): ?> <a class="btn btn-xs btn-success" href="<?php echo e(url('/user/dashboard/quotation-convert-to-po/'.$quotation->sqd_id)); ?>" title="Quotation To PO Convert" > Convert to PO </a> <?php endif; ?> </div> </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="supplierStatusModal"> <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">Status</h4> </div> <div class="modal-body" id="supplierStatusBody"> </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"> $(document).ready(function(){ console.log('quotation from status1 '); $('#quotation_status_frm').submit(function(e){ e.preventDefault(); console.log('quotation from status2 '); $.ajax({ url: $('#quotation_status_frm').attr('action'), method: 'POST', data: $('#quotation_status_frm').serialize(), success: function(data){ console.log('after success '); 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> <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 viewHistoryModal(sqd_id){ if(sqd_id == ""){ swal('Error','Supplier Quotation id is missing','warning'); }else{ $.ajax({ url: "/user/get-supplier-details/"+sqd_id, type: 'GET', success:function(data){ $('#supplierStatusBody').html(data); $('#supplierStatusModal').modal('toggle'); // OnLoad(); } }); } } function updateStatus() { console.log("hello from update status :"); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') } }); $.ajax({ url: $('#quotation_status_frm').attr('action'), method: 'POST', data: $('#quotation_status_frm').serialize(), success: function(data){ console.log('after success '); if(data.flag){ $('#supplierStatusModal').modal('hide'); swal({ title: "Success!", text: data.msg, type: "success" }, function() { window.location.reload(); }); } else { alert("Something went wrong."); } } }); } 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 showError(id,error){ if(typeof(error) === "undefined"){ $('#'+id).hide(); }else{ $('#'+id).show(); $('#'+id).text(error); } } </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 /var/www/scm/resources/views/dashboard/supplier-quotation/all-supplier-quotation.blade.php ENDPATH**/ ?>