@extends('layouts.admin-simple') @section('title', 'Reference Allocations - ' . $item->item_description) @section('breadcrumb') @endsection @section('page-title')

Reference Allocations

Item: {{ $item->item_description }} ({{ $item->item_code }}) | Project: {{ $project->project_name }}

arrow_back Back to Stock Details
@endsection @section('content')
inventory_2 Item Information
Item Code: {{ $item->item_code }}
Description: {{ $item->item_description }}
Unit: {{ $item->unit_of_measure }}
output
Total Released
{{ number_format($totals['total_released'], 2) }}
undo
Total Returned
{{ number_format($totals['total_returned'], 2) }}
swap_horiz
Total Transferred
{{ number_format($totals['total_transferred'], 2) }}
check_circle
Net Available
{{ number_format($totals['total_net'], 2) }}
receipt_long Reference Allocations Detail @if($references->count() > 0) {{ $references->count() }} References @endif
@if($references->count() > 0)
@foreach($references as $ref) @php $typeClass = $ref['type'] === 'Material Request' ? 'badge-primary' : ($ref['type'] === 'Direct Delivery' ? 'badge-success' : 'badge-info'); $statusClass = in_array(strtolower($ref['status']), ['successful', 'delivered', 'approved', 'received']) ? 'badge-success' : 'badge-warning'; @endphp @endforeach
Type Reference # Date Requested By / Supplier Division / From Status Released Returned Transferred Net Qty Value (AED)
{{ $ref['type'] }} {{ $ref['reference_number'] }} {{ $ref['date'] }} {{ $ref['requested_by'] }} {{ $ref['division'] }} {{ $ref['status'] }} {{ number_format($ref['quantity_released'], 2) }} {{ number_format($ref['quantity_returned'], 2) }} {{ number_format($ref['quantity_transferred'], 2) }} {{ number_format($ref['net_quantity'], 2) }} AED {{ number_format($ref['total_value'], 2) }}
Total {{ number_format($totals['total_released'], 2) }} {{ number_format($totals['total_returned'], 2) }} {{ number_format($totals['total_transferred'], 2) }} {{ number_format($totals['total_net'], 2) }} AED {{ number_format($totals['total_value'], 2) }}
@else
inbox
No Reference Allocations Found

No reference allocations found for this item in the selected project.
This means the item hasn't been delivered or transferred to this project.

arrow_back Back to Stock Details
@endif
@if($references->count() > 0)
info Allocation Summary
Reference Type Distribution
@php $materialRequests = $references->where('type', 'Material Request')->count(); $directDeliveries = $references->where('type', 'Direct Delivery')->count(); $materialTransfers = $references->where('type', 'Material Transfer')->count(); @endphp
Material Requests: {{ $materialRequests }}
Direct Deliveries: {{ $directDeliveries }}
Material Transfers: {{ $materialTransfers }}
Key Metrics
Total References: {{ $references->count() }}
Total Value: AED {{ number_format($totals['total_value'], 2) }}
Return Rate: @if($totals['total_released'] > 0) {{ number_format(($totals['total_returned'] / $totals['total_released']) * 100, 2) }}% @else 0% @endif
@endif
@endsection @push('scripts') @endpush