/
home
/
sjslayjy
/
public_html
/
assets
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startPush('plugin-styles'); ?> <!-- <?php echo Html::style('/assets/plugins/plugin.css'); ?> --> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <div class="row"> <div class="col-lg-12 grid-margin"> <div class="card"> <div class="card-body"> <h3 class="card-title">Onetime Material Consumption Request (OMCR) Details</h3> <div class="row"> <div class="col-lg-3"> <label>MR Number : <br/><strong><?php echo e($omc->mr_no); ?></strong></label> </div> <div class="col-lg-3"> <label>PO No : <br/><strong><?php echo e($omc->po_no); ?></strong></label> </div> <div class="col-lg-3"> <label>PO date : <br/><strong><?php echo e($omc->cutomer_po_date); ?></strong></label> </div> <div class="col-lg-3"> <label>Status : <br/> <?php if( $omc->status == 'authorize'): ?> <strong class="badge badge-success"><?php echo e($omc->status); ?></strong> <?php else: ?> <strong class="badge badge-warning"><?php echo e($omc->status); ?></strong> <?php endif; ?> </label> </div> </div> <div class="row"> <div class="col-lg-3"> <label>Invoice No : <br/><strong><?php echo e($omc->invoice_no); ?></strong></label> </div> <div class="col-lg-3"> <label>Invoice Date : <br/><strong><?php echo e($omc->invoice_date); ?></strong></label> </div> <div class="col-lg-3"> <label>Invoice Basic Value : <br/><strong><?php echo e($omc->invoice_basic_value); ?></strong></label> </div> <div class="col-lg-3"> <label>Site ID : <br/><strong><?php echo e($omc->site_id); ?></strong></label> </div> </div> <div class="row"> <div class="col-lg-3"> <label>Site Name : <br/><strong><?php echo e($omc->site_name); ?></strong></label> </div> <div class="col-lg-3"> <label>Complain Closure Date : <br/><strong><?php echo e($omc->complaint_closure_date); ?></strong></label> </div> <div class="col-lg-3"> <label>Customer Open PO Status : <br/><strong><?php echo e($omc->cust_open_po_status); ?></strong></label> </div> <div class="col-lg-3"> <label>Open PO Amount : <br/><strong><?php echo e($omc->open_po_amount); ?></strong></label> </div> </div> <div class="row"> <div class="col-lg-3"> <label>Invoice Value : <br/><strong><?php echo e($omc->invoice_value); ?></strong></label> </div> <div class="col-lg-3"> <label>Requested BY : <br/><strong><?php echo e($omc->requestedBy($omc->request_by)); ?></strong></label> </div> <?php if($omc->authorize_by != null): ?> <div class="col-lg-3"> <label>Authorize BY : <br/><strong><?php echo e($omc->authorizeBy($omc->authorize_by)); ?></strong></label> </div> <?php endif; ?> </div> </div> </div> </div> <div class="col-lg-12 grid-margin"> <div class="card"> <div class="card-body"> <div class="row grid-margin"> <div class="col-lg-4"> <h4 class="card-title">Authorized Spare Parts List</h4> </div> </div> <div class="table-responsive"> <table class="table table-striped table-bordered"> <thead> <tr> <th>Item Code</th> <th>Description</th> <th>Rate(Rs)</th> <th>Type</th> <th>Qty</th> <th>Total</th> </tr> </thead> <tbody id="tbody"> <?php $subtotal = 0; $gsttotal = 0; ?> <?php $__currentLoopData = $omc_items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $omcitem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $total = 0; $rtotal = 0; $rgst = 0; $fgst = 0; ?> <?php if($omcitem->fresh_qty != 0): ?> <tr> <td><?php echo e($omcitem->spare_code); ?></td> <td><?php echo e($omcitem->description); ?></td> <td><?php echo e($omcitem->rate); ?></td> <td>Fresh</td> <td><?php echo e($omcitem->fresh_qty); ?></td> <?php $fgst = (($omcitem->rate*$omcitem->fresh_qty)*$omcitem->gst)/100; ?> <td style="text-align: right;"><?php echo e($total = $omcitem->rate*$omcitem->fresh_qty); ?> Rs</td> <?php $subtotal = $subtotal + $total; ?> </tr> <?php endif; ?> <?php if($omcitem->repaired_qty != 0): ?> <tr> <td><?php echo e($omcitem->spare_code); ?></td> <td><?php echo e($omcitem->description); ?></td> <td><?php echo e($rate = $omcitem->rate); ?></td> <td>Repaired</td> <td><?php echo e($omcitem->repaired_qty); ?></td> <?php $rgst = (($rate*$omcitem->repaired_qty)*$omcitem->gst)/100; ?> <td style="text-align: right;"><?php echo e($rtotal = ($rate*$omcitem->repaired_qty)); ?> Rs</td> <?php $subtotal = $subtotal + $rtotal; ?> </tr> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <tfoot class="footer"> <tr> <td colspan="5"> Total </td> <td ><span id="sub_total" style="float: right;"><?php echo e(round($subtotal,2)); ?> Rs</span></td> </tr> </tfoot> </table> <div id="loaderAction"> <div class="loader"></div> </div> </div> </div> </div> </div> <div class="col-lg-12 grid-margin"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-lg-8"></div> <div class="col-lg-4"> <?php if( $omc->status == 'request' && (Auth::user()->role == 17 || Auth::user()->role == 23 || Auth::user()->role == 18)): ?> <a onclick="authorized_omc()" class="btn btn-lg fw-bold" style="background-color: #5ced73; color:#ffffff; font-weight: bold; font-size:15px;">Authorize</a> <a onclick="cancle_omc()" class="btn btn-lg fw-bold" style="background-color: #E1341E; color:#ffffff; font-weight: bold; font-size:15px;">Reject</a> <?php endif; ?> </div> </div> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('plugin-scripts'); ?> <?php echo Html::script('/assets/plugins/chartjs/chart.min.js'); ?> <?php echo Html::script('/assets/plugins/jquery-sparkline/jquery.sparkline.min.js'); ?> <?php $__env->stopPush(); ?> <?php $__env->startPush('custom-scripts'); ?> <?php echo Html::script('/assets/js/dashboard.js'); ?> <script type="text/javascript"> function cancle_omc() { swal({ title:"Do You Want to Cancle the OMCR ?", text:"If yes then press 'OK' button otherwise press 'Cancel' button to Reject it.", icon:"warning", buttons:true, dangerMode: true }).then((willDelete)=>{ if(willDelete) { var url = window.location.origin+"/admin/cancle-omc" var data = {}; data._token = "<?php echo e(csrf_token()); ?>"; data.omc_id = "<?php echo e($omc->id); ?>"; $('#loaderAction').show(); $.ajax({ url:url, type:"POST", data: data, success:function(res){ console.log(res); if(res.success == true){ swal(res.msg, { icon: "success", }); window.location.href = window.location.origin+"/admin/all-omc-requests"; }else{ swal(res.msg, { icon: "error", }); } $('#loaderAction').hide(); }, error:function(error){ console.log(error); }, dataType: 'json' }); } }); } function authorized_omc(){ swal({ title: "Do you want to authorise the OMCR?", text: "if yes then press 'OK' button otherwise press 'Cancel' button to Reject it.", icon: "warning", buttons: true, dangerMode: true, }).then((willDelete) => { if (willDelete) { var url = window.location.origin+"/admin/authorize-omc" var data = {}; data._token = "<?php echo e(csrf_token()); ?>"; data.omc_id = "<?php echo e($omc->id); ?>"; $('#loaderAction').show(); $.ajax({ type: "POST", url: url, data: data, success:function(res){ console.log(res); if(res.success == true){ swal(res.msg, { icon: "success", }); window.location.href = window.location.origin+"/admin/all-omc-requests"; }else{ swal(res.msg, { icon: "error", }); } $('#loaderAction').hide(); }, error:function(error){ console.log(error); }, dataType: 'json' }); } }); } </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/assets/resources/views/admin/omc/omc.blade.php ENDPATH**/ ?>