File manager - Edit - /var/www/payraty/inventory_main/storage/framework/views/411ae34f272914c74b647cfc8aec92f6d397802a.php
Back
<?php $__env->startSection('content'); ?> <div class="page-title-box"> <div class="row align-items-center"> <div class="col-sm-6"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="/admin/purchases"><?php echo e(__t('purchases')); ?></a></li> <li class="breadcrumb-item active"><?php echo e(__t('view') . ' ' . __t('purchase')); ?></li> </ol> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="d-flex"> <button data-div-name="section-to-print-pshow" class="mr-2 btn btn-primary section-print-btn" type="button"> <i class="fa fa-print"></i> <?php echo e(__t('print')); ?></button> <div class="dropdown mr-2"> <button class="btn btn-dark dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Actions </button> <div class="dropdown-menu " aria-labelledby="dropdownMenuButton"> <?php if($purchase->status != 'cancel'): ?> <?php if(is_null($purchase->received)): ?> <?php if(auth()->user()->can('Edit Purchase')): ?> <a class="dropdown-item" href="<?php echo e(route('admin.purchases.edit', $purchase->id)); ?>"> <i class="fa fa-edit"></i> Edit </a> <?php endif; ?> <?php if(auth()->user()->can('Cancel Purchase')): ?> <a class="dropdown-item" href="<?php echo e(route('admin.purchases.cancel', $purchase->id)); ?>"> <i class="fa fa-times"></i> Cancel </a> <?php endif; ?> <?php endif; ?> <?php if(auth()->user()->can('Receive Purchase')): ?> <a class="dropdown-item" href="<?php echo e(route('admin.purchases.receive', $purchase->id)); ?>"> <i class="fa fa-arrow-circle-down"></i> Receive </a> <?php endif; ?> <?php if(auth()->user()->can('Return Purchase')): ?> <?php if($purchase->status == 'confirmed' && $purchase->received): ?> <a class="dropdown-item" href="<?php echo e(route('admin.purchases.return', $purchase->id)); ?>"> <i class="fa fa-undo-alt"></i> Return </a> <?php endif; ?> <?php endif; ?> <?php endif; ?> <form class="form-delete-button d-inline" action="<?php echo e(route('admin.purchases.destroy', $purchase->id)); ?>" id="delete-form-<?php echo e($purchase->id); ?>" method="POST"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <a class="dropdown-item text-danger button-delete" href="javascript:void(0);" onclick="event.preventDefault(); if(confirm('Are you sure you want to delete this purchase?')) { document.getElementById('delete-form-<?php echo e($purchase->id); ?>').submit(); }"> <i class="mdi mdi-trash-can-outline"></i> Delete </a> </form> </div> </div> <?php if(auth()->user()->po_approval_level && ($purchase->approval_level1 === 'pending' || $purchase->approval_level2 === 'pending')): ?> <button data-target="#approvalModalCenter" data-toggle="modal" class="btn btn-success mr-2" type="button"> <i class="fa fa-check"></i> Approve Order </button> <button data-target="#rejectionModalCenter" data-toggle="modal" class="btn btn-danger mr-2" type="button"> <i class="fa fa-close"></i> Reject Order </button> <?php endif; ?> </div> <br> <div class="card"> <div class="card-body"> <div id="section-to-print-pshow"> <div class="table-responsive"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td> <table class="ic-purchase-print" width="100%" cellpadding="0" cellspacing="0"> <tr> <td><b><?php echo e(__t('purchase_number')); ?></b></td> <td>:</td> <td><?php echo e($purchase->purchase_number); ?></td> </tr> <tr> <td><b><?php echo e(__t('supplier')); ?></b></td> <td>:</td> <td><?php echo e($purchase->supplier->full_name); ?></td> </tr> <tr> <td><b><?php echo e(__t('supplier_phone')); ?></b></td> <td>:</td> <td><?php echo e($purchase->supplier->phone); ?></td> </tr> <tr> <td><b><?php echo e(__t('warehouse')); ?></b></td> <td>:</td> <td><?php echo e($purchase->company); ?></td> </tr> <tr> <td><b><?php echo e(__t('company')); ?></b></td> <td>:</td> <td><?php echo e($purchase->company); ?></td> </tr> <tr> <td><b><?php echo e(__t('date')); ?></b></td> <td>:</td> <td><?php echo e(date('Y-m-d', strtotime($purchase->date))); ?></td> </tr> <tr> <td><b><?php echo e(__t('note')); ?></b></td> <td>:</td> <td><?php echo e($purchase->notes); ?></td> </tr> <tr> <td><b><?php echo e(__t('short_address')); ?></b></td> <td>:</td> <td><?php echo e($purchase->short_address); ?></td> </tr> </table> </td> <td> <table class="ic-purchase-print" width="100%" cellpadding="0" cellspacing="0"> <tr> <td><b><?php echo e(__t('address_line_1')); ?></b></td> <td>:</td> <td><?php echo e($purchase->address_line_1); ?></td> </tr> <tr> <td><b><?php echo e(__t('address_line_2')); ?></b></td> <td>:</td> <td><?php echo e($purchase->address_line_2); ?></td> </tr> <tr> <td><b><?php echo e(__t('country')); ?></b></td> <td>:</td> <td><?php echo e(optional($purchase->systemCountry)->name); ?></td> </tr> <tr> <td><b><?php echo e(__t('state')); ?></b></td> <td>:</td> <td><?php echo e(optional($purchase->systemState)->name); ?></td> </tr> <tr> <td><b><?php echo e(__t('city')); ?></b></td> <td>:</td> <td><?php echo e(optional($purchase->systemCity)->name); ?></td> </tr> <tr> <td><b><?php echo e(__t('status')); ?> </b></td> <td>:</td> <td> <?php if($purchase->status == \App\Models\Purchase::STATUS_REQUESTED): ?> <span class="badge badge-primary"><?php echo e(strtoupper($purchase->status)); ?></span> <?php elseif($purchase->status == \App\Models\Purchase::STATUS_CONFIRMED): ?> <span class="badge badge-success"><?php echo e(strtoupper($purchase->status)); ?></span> <?php else: ?> <span class="badge badge-danger"><?php echo e(strtoupper($purchase->status)); ?></span> <?php endif; ?> </td> </tr> <tr> <td><b><?php echo e(__t('received')); ?></b></td> <td>:</td> <td> <?php if($purchase->received): ?> <span class="badge badge-success"><?php echo e(strtoupper(__t('received'))); ?></span> <?php else: ?> <span class="badge badge-warning"><?php echo e(strtoupper(__t('not_received_yet'))); ?></span> <?php endif; ?> </td> </tr> <tr> <td><b>Approval Status</b></td> <td>:</td> <td> <?php if($purchase->approval_level1 === 'approved'): ?> <span class="badge badge-success"> <?php echo e(strtoupper('Approved by Procurement Manager')); ?> || <?php echo e($purchase->approvalProcurement->name); ?> || <?php echo e($purchase->approvalProcurement->id); ?> </span> <div class="mt-2"> <?php if($purchase->approval_level2 === 'approved'): ?> <span class="badge badge-success"> <?php echo e(strtoupper('Approved by Managing Director')); ?> || <?php echo e($purchase->approval_managing_director->name); ?> || <?php echo e($purchase->approval_managing_director->id); ?> </span> <?php elseif($purchase->approval_level2 === 'rejected'): ?> <br> <span class="badge badge-danger mt-1"> <?php echo e(strtoupper('Rejected by Managing Director')); ?> || <?php echo e($purchase->approval_managing_director->name); ?> || <?php echo e($purchase->approval_managing_director->id); ?> </span> <div> <small> Rejection Note: <?php echo e($purchase->rejection_note); ?> </small> </div> <?php else: ?> <span class="badge badge-warning mt-2"> <?php echo e(strtoupper('Pending Managing Director Approval')); ?> </span> <?php endif; ?> </div> <?php elseif($purchase->approval_level1 === 'rejected'): ?> <span class="badge badge-danger"> <?php echo e(strtoupper('Rejected by Procurement Manager')); ?> || <?php echo e($purchase->approvalProcurement->name); ?> || <?php echo e($purchase->approvalProcurement->id); ?> </span> <div> <small> Rejection Note: <?php echo e($purchase->rejection_note); ?> </small> </div> <?php else: ?> <span class="badge badge-warning"> <?php echo e(strtoupper('Pending Procurement Manager Approval')); ?> </span> <?php endif; ?> </td> </tr> </table> </td> </tr> </table> </div> <div class="row"> <div class="col-sm-12"> <div class="table-responsive"> <table class="table table-bordered"> <thead> <tr> <th><?php echo e(__t('sl')); ?></th> <th><?php echo e(__t('sku')); ?></th> <th><?php echo e(__t('product_name')); ?></th> <th><?php echo e(__t('quantity')); ?></th> <th><?php echo e(__t('price')); ?></th> <th><?php echo e(__t('note')); ?></th> <th><?php echo e(__t('sub_total')); ?></th> </tr> </thead> <tbody> <?php $__currentLoopData = $purchase->purchaseItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $purchaseItems): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($key + 1); ?></td> <td><?php echo e($purchaseItems->product->sku); ?></td> <td><?php echo e($purchaseItems->product->name); ?> <?php if( $purchaseItems->product->is_variant != null && $purchaseItems->product->is_variant == 1 && isset($purchaseItems->productStock)): ?> (<?php echo e(optional(optional($purchaseItems->productStock)->attribute)->name ?? ''); ?> : <?php echo e(optional(optional($purchaseItems->productStock)->attributeItem)->name ?? ''); ?>) <?php endif; ?> </td> <td><?php echo e($purchaseItems->quantity); ?></td> <td class="text-right"> <?php echo e(currencySymbol() . makeCurrencyFormat($purchaseItems->price)); ?> </td> <td><?php echo e($purchaseItems->note); ?></td> <td class="text-right"> <?php echo e(currencySymbol() . makeCurrencyFormat($purchaseItems->sub_total)); ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <tfoot> <tr> <th colspan="6" class="text-right"><?php echo e(__t('total')); ?>: </th> <th class="text-right"> <?php echo e(currencySymbol() . makeCurrencyFormat($purchase->total)); ?> </th> </tr> </tfoot> </table> </div> </div> </div> </div> </div> </div> </div> </div> <div class="modal fade" id="approvalModalCenter" tabindex="-1" role="dialog" aria-labelledby="confirmApprovalTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <!-- Header --> <div class="modal-header"> <h5 class="modal-title" id="confirmApprovalTitle">Confirm Approval</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <!-- Body --> <div class="modal-body"> Are you sure you want to approve this request? This action cannot be undone. </div> <!-- Footer --> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <a href="/admin/purchases/<?php echo e($purchase->id); ?>/approve" type="button" id="confirmApprovalBtn" class="btn btn-success">Yes, Approve</a> </div> </div> </div> </div> <div class="modal fade" id="rejectionModalCenter" tabindex="-1" role="dialog" aria-labelledby="confirmApprovalTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <!-- Header --> <div class="modal-header"> <h5 class="modal-title" id="confirmApprovalTitle">Confirm Reject</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <!-- Body --> <div class="modal-body"> Are you sure you want to reject this request? This action cannot be undone. <br> <br> <form id="rejectForm" method="POST" action="/admin/purchases/<?php echo e($purchase->id); ?>/reject"> <?php echo csrf_field(); ?> <textarea required name="rejection_note" placeholder="Rejection Note" class="form-control border"></textarea> </form> </div> <!-- Footer --> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="submit" form="rejectForm" id="confirmApprovalBtn" class="btn btn-danger">Yes, Reject</button> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('style'); ?> <?php $__env->stopPush(); ?> <?php $__env->startPush('script'); ?> <script> // function approvalOrder() { // $('#approvalModalCenter').modal('show') // } </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/payraty/inventory_main/resources/views/admin/purchase/show.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings