@php $logoPath = null; if (!empty($organisation->logo)) { $logoPath = 'storage/app/public/' . ltrim(str_replace('storage/', '', $organisation->logo), '/'); $absolutePath = base_path($logoPath); } @endphp @if(!empty($logoPath) && file_exists($absolutePath)) {{ $organisation->organisation_name ?? 'Company Logo' }} @else
Company Logo
@endif
{{ $organisation->organisation_name ?? 'SAHARA' }}
PURCHASE REQUISITION
Requisition #: {{ $requisition->request_no ?? 'N/A' }} | Date: {{ isset($requisition->requisition_date) ? \Carbon\Carbon::parse($requisition->requisition_date)->format('d/m/Y') : 'N/A' }}
Request Details

Requested By: {{ $requisition->requester->first_name ?? 'N/A' }} {{ $requisition->requester->last_name ?? '' }}

Department: {{ $requisition->department->name ?? 'N/A' }}

Procurement Type: {{ $requisition->procurement_type ?? 'N/A' }}

Total Estimated Cost: {{ isset($requisition->total_estimated_cost) ? number_format($requisition->total_estimated_cost, 2) : '0.00' }}

Total Approved Cost: {{ isset($requisition->total_approved_cost) ? number_format($requisition->total_approved_cost, 2) : '0.00' }}

Priority: {{ $requisition->priority ?? 'N/A' }}

Status: {{ $requisition->status ?? 'DRAFT' }}

Special Instructions:

{{ $requisition->special_instructions ?? 'None' }}
Requisition Items
@forelse($requisition->items ?? [] as $item) {{-- Delivery & Status --}} {{-- Quantities --}} {{-- Unit Prices --}} {{-- Totals --}} @empty @endforelse
# Description Purpose Delivery Date Req Qty App Qty Req Unit Price App Unit Price Req Total App Total
{{ $loop->iteration }} {{ $item->item_name ?? $item->description ?? 'N/A' }} {{ $item->purpose ?? '-' }} {{ isset($item->item_delivery_date) ? \Carbon\Carbon::parse($item->item_delivery_date)->format('d/m/Y') : '-' }} {{ isset($item->quantity) ? number_format($item->quantity, 2) : '0.00' }} {{ isset($item->approved_quantity) ? number_format($item->approved_quantity, 2) : '0.00' }}{{ isset($item->estimated_unit_price) ? number_format($item->estimated_unit_price, 2) : '0.00' }} {{ isset($item->approved_cost_estimate) ? number_format($item->approved_cost_estimate, 2) : '-' }} {{ isset($item->estimated_total_price) ? number_format($item->estimated_total_price, 2) : '0.00' }} {{ isset($item->approved_total_cost_estimate) ? number_format($item->approved_total_cost_estimate, 2) : '-' }}
No items found in this requisition
Totals: {{ number_format(($requisition->items ?? collect())->sum('estimated_total_price'), 2) }} {{ number_format(($requisition->items ?? collect())->sum('approved_total_cost_estimate'), 2) }}
Approval History
@forelse($requisition->approvals ?? [] as $approval) @empty @endforelse
@php $signaturePath = null; if (!empty($approval->approver->user->signature)) { $signaturePath = 'storage/app/public/' . ltrim(str_replace('storage/', '', $approval->approver->user->signature), '/'); $absolutePath = base_path($signaturePath); } @endphp @if(!empty($signaturePath) && file_exists($absolutePath)) Signature @endif
Approver: {{ $approval->approver->first_name ?? 'N/A' }} {{ $approval->approver->last_name ?? '' }}
Level: {{ $approval->approval_level->name ?? 'N/A' }}
Date: {{ isset($approval->approved_at) ? \Carbon\Carbon::parse($approval->approved_at)->format('d/m/Y') : 'N/A' }}
Status: {{ $approval->status ?? 'PENDING' }}
No approval history available