@extends('layouts.admin-simple') @section('title', 'Material Request - ' . $igRequest->request_number) @section('breadcrumb') @endsection @section('page-title')

Material Request Details

{{ $igRequest->request_number }}

@if(in_array($igRequest->status, ['issued', 'partially_issued'])) print Print @endif @if($igRequest->status === 'pending_approval')
@csrf
@endif @if($igRequest->status === 'approved')
@csrf
@endif arrow_back Back to List
@endsection @section('content') @if($igRequest->status === 'pending_approval')
pending Pending Approval: This request is waiting for manager approval before materials can be issued.
@elseif($igRequest->status === 'approved')
check_circle Approved: This request has been approved. Materials are ready to be issued.
@elseif($igRequest->status === 'issued')
local_shipping Issued: All requested materials have been issued and inventory has been updated.
@elseif($igRequest->status === 'partially_issued')
warning Partially Issued: Some items could not be fully issued due to insufficient stock.
@elseif($igRequest->status === 'rejected')
cancel Rejected: This request has been rejected. @if($igRequest->rejection_reason)
Reason: {{ $igRequest->rejection_reason }} @endif
@elseif($igRequest->status === 'cancelled')
block Cancelled: This request has been cancelled.
@endif
info Request Information

Request Number:
{{ $igRequest->request_number }}

Request Date:
{{ $igRequest->request_date ? $igRequest->request_date->format('M d, Y') : '-' }}

Status:
@switch($igRequest->status) @case('draft') Draft @break @case('pending_approval') Pending Approval @break @case('approved') Approved @break @case('rejected') Rejected @break @case('issued') Issued @break @case('partially_issued') Partially Issued @break @case('cancelled') Cancelled @break @endswitch

Requires Approval:
@if($igRequest->requires_approval) Yes @else No (Auto-approved) @endif

Project:
@if($igRequest->project) {{ $igRequest->project->project_number }} - {{ $igRequest->project->project_name }} @else N/A @endif

Division:
@if($igRequest->division) {{ $igRequest->division->division_name }} @else N/A @endif

Requested By:
@if($igRequest->requester) {{ $igRequest->requester->name }} @else N/A @endif

Receiver:
{{ $igRequest->receiver_name ?: '-' }}

@if($igRequest->notes)

Notes:
{{ $igRequest->notes }}

@endif @if($igRequest->request_file)

Request File:
@php $requestFileUrl = \Illuminate\Support\Str::startsWith($igRequest->request_file, 'uploads/') ? asset($igRequest->request_file) : asset('storage/' . $igRequest->request_file); @endphp attachment View / Download File

@endif
shopping_cart Requested Items ({{ $igRequest->items->count() }})
@forelse($igRequest->items as $index => $item) @empty @endforelse @if($igRequest->items->count() > 0 && $igRequest->items->sum('total_price') > 0) @endif
# Code Description Qty Requested Qty Released Qty Balance Unit Price Total Notes
{{ $index + 1 }} @if($item->indirectGood) {{ $item->indirectGood->ig_code }} @else N/A @endif @if($item->indirectGood) {{ $item->indirectGood->ig_description }} @if($item->indirectGood->unit_of_measure)
{{ $item->indirectGood->unit_of_measure }} @endif @else Unknown @endif
{{ number_format($item->quantity_requested, 2) }} @if($item->quantity_released > 0) {{ number_format($item->quantity_released, 2) }} @else - @endif @if($item->quantity_balance > 0) {{ number_format($item->quantity_balance, 2) }} @else 0.00 @endif @if($item->unit_price > 0) AED {{ number_format($item->unit_price, 2) }} @else - @endif @if($item->total_price > 0) AED {{ number_format($item->total_price, 2) }} @else - @endif {{ $item->notes ?: '-' }}
shopping_cart
No items in this request
Total Amount: AED {{ number_format($igRequest->items->sum('total_price'), 2) }}
flash_on Quick Actions
@if($igRequest->status === 'pending_approval')
@csrf
@endif @if($igRequest->status === 'approved')
@csrf
@endif print Print Request list All Requests
timeline Request Timeline
Request Created

{{ $igRequest->created_at->format('M d, Y \a\t h:i A') }} @if($igRequest->requester)
by {{ $igRequest->requester->name }} @endif

@if($igRequest->approved_at)
{{ $igRequest->status === 'rejected' ? 'Request Rejected' : 'Request Approved' }}

{{ $igRequest->approved_at->format('M d, Y \a\t h:i A') }} @if($igRequest->approvedBy)
by {{ $igRequest->approvedBy->name }} @endif

@endif @if($igRequest->issued_at)
Materials Issued

{{ $igRequest->issued_at->format('M d, Y \a\t h:i A') }} @if($igRequest->issuedBy)
by {{ $igRequest->issuedBy->name }} @endif @if($igRequest->status === 'partially_issued')
Partial Issue @endif

@endif
@if($igRequest->status === 'pending_approval') @endif @endsection @push('styles') @endpush