@extends('layouts.app') @section('title') Purchase Order @stop @section('breadcrumb') @stop @section('css') @stop @section('content')
@if(Session::has('success')) @endif

Purchase Order List

@if( $purchase_requests->count() > 0 ) @foreach( $purchase_requests as $list ) @endforeach @endif
Id# Department Created By Current Status Total PO Action
@permission('view-purchase-request') PR-{{$list->id }} @else PR-{{$list->id }} @endpermission {{ \App\Department::withTrashed()->find($list->department_id)->department_name }} {{ $list->user->name}} @if($list->status == 0) Pending @elseif($list->status == 1) In Progress @elseif($list->status == 2) Rejected @elseif($list->status == 3) RFQ @elseif($list->status == 4) @permission('view-request-for-quotation') RFQ SEND @endpermission @elseif($list->status == 5) @permission('view-comparative-statement') CS Received @endpermission @elseif($list->status == 6) @permission('view-purchase-order') PO Sent @endpermission @elseif($list->status == 7) @php $getPrStatus = \App\PurchaseRequest::getPrStatus($list->id); @endphp @if( $getPrStatus['pending_po'] > 0) @permission('view-purchase-order') PO PENDING {{ $getPrStatus['pending_po'] }} @endpermission @elseif( $getPrStatus['pending_recipt'] > 0) @permission('view-po-receipt') RECEIPT PENDING{{$getPrStatus['pending_recipt']}} @endpermission @elseif($getPrStatus['total_rfq'] > $getPrStatus['total_cs']) @permission('view-request-for-quotation') CS PENDING{{$getPrStatus['total_rfq'] - $getPrStatus['total_cs']}} @endpermission @else Complete @endif @endif @php $total_po = \App\PurchaseOrder::getVendorIds($list->id); @endphp [ {{sizeof($total_po)}} ] @if(sizeof($total_po) > 0) @else {{'No PO'}} @endif
@stop