📦 Purchase Order Summary Report

Generated on: {{ $report_date }}

Period: {{ $date_range['from'] }} to {{ $date_range['to'] }}

Summary Statistics

Total Orders: {{ number_format($summary['total_orders']) }}
Total Value: ${{ number_format($summary['total_value'], 2) }}
Average Order Value: ${{ number_format($summary['average_order_value'], 2) }}
Total Items: {{ number_format($summary['total_items']) }}
Unique Products: {{ number_format($summary['unique_products']) }}
Unique Suppliers: {{ number_format($summary['unique_suppliers']) }}
Pending Orders: {{ number_format($summary['pending_orders']) }}
Completed Orders: {{ number_format($summary['completed_orders']) }}
Cancelled Orders: {{ number_format($summary['cancelled_orders']) }}

Performance Metrics

{{ $performance_metrics['avg_processing_time'] }} days
Avg Processing Time
{{ $performance_metrics['on_time_delivery_rate'] }}%
On-Time Delivery Rate
{{ $performance_metrics['order_accuracy_rate'] }}%
Order Accuracy Rate
@if(!empty($by_status))
Orders by Status
@foreach($by_status as $status) @endforeach
Status Count Total Value Average Value % of Total
{{ ucfirst($status['status']) }} {{ number_format($status['count']) }} ${{ number_format($status['total_value'], 2) }} ${{ number_format($status['avg_value'], 2) }} {{ $summary['total_orders'] > 0 ? round(($status['count'] / $summary['total_orders']) * 100, 1) : 0 }}%
@endif @if(!empty($by_supplier))
Top Suppliers
@foreach($by_supplier as $supplier) @endforeach
Supplier Orders Total Value Avg Order Value Last Order Date
{{ $supplier['supplier'] }} {{ number_format($supplier['count']) }} ${{ number_format($supplier['total_value'], 2) }} ${{ number_format($supplier['avg_value'], 2) }} {{ \Carbon\Carbon::parse($supplier['last_order_date'])->format('Y-m-d') }}
@endif @if(!empty($monthly_summary))
Monthly Trend
@foreach($monthly_summary as $month) @endforeach
Month Orders Total Value Avg Value Unique Suppliers
{{ \Carbon\Carbon::parse($month['month'] . '-01')->format('F Y') }} {{ number_format($month['count']) }} ${{ number_format($month['total_value'], 2) }} ${{ number_format($month['avg_value'], 2) }} {{ number_format($month['unique_suppliers']) }}
@endif @if(!empty($top_products))
Top Purchased Products
@foreach($top_products as $product) @endforeach
Product ID Supplier Total Quantity Total Value Avg Price Order Count
{{ $product['product_id'] }} {{ $product['supplier'] }} {{ number_format($product['total_quantity']) }} ${{ number_format($product['total_value'], 2) }} ${{ number_format($product['avg_price'], 2) }} {{ number_format($product['order_count']) }}
@endif @if(!empty($orders))
Recent Purchase Orders (Latest 100)
@foreach($orders as $order) @endforeach
PO Number Supplier Warehouse Status Created Expected Received Items Quantity Total Amount Created By
{{ $order['po_number'] }} {{ $order['supplier'] }} {{ $order['warehouse'] }} {{ $order['status'] }} {{ $order['created_date'] }} {{ $order['expected_date'] }} {{ $order['received_date'] }} {{ number_format($order['item_count']) }} {{ number_format($order['total_quantity']) }} ${{ number_format($order['total_amount'], 2) }} {{ $order['created_by'] }}
@else

No purchase orders found for the selected period and filters.

@endif