@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 }}
filter_list Filters
receipt_long Reference Allocations - {{ $item->item_description }} ({{ $references->count() }} references)
Loading...
Loading allocations data...
@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', 'fully dispatched', 'partially dispatched', 'transferred']) ? 'badge-success' : 'badge-warning'; @endphp @endforeach
Type Reference # Date Requested By / Supplier Division / From Status Released Returned Dmg. Returned Transferred Net Qty Unit Price Value (AED)
{{ $ref['type'] }} {{ $ref['reference_number'] }} {{ $ref['date'] }} {{ $ref['requested_by'] }} {{ $ref['division'] }} {{ $ref['status'] }} {{ number_format($ref['quantity_released'], 2) }} @if($ref['quantity_returned'] > 0) {{ number_format($ref['quantity_returned'], 2) }} @else 0.00 @endif @if(($ref['quantity_damaged'] ?? 0) > 0) {{ number_format($ref['quantity_damaged'], 2) }} @else 0.00 @endif @if($ref['quantity_transferred'] > 0) {{ number_format($ref['quantity_transferred'], 2) }} @else 0.00 @endif {{ number_format($ref['net_quantity'], 2) }} {{ number_format($ref['unit_price'] ?? 0, 2) }} {{ number_format($ref['total_value'], 2) }}
Total {{ number_format($totals['total_released'], 2) }} {{ number_format($totals['total_returned'], 2) }} {{ number_format($totals['total_damaged'] ?? 0, 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.

@endif
@if($references->count() > 0)
info Allocation Summary
{{ $references->where('type', 'Material Request')->count() }}
Material Requests
Inventory dispatch references
{{ $references->where('type', 'Direct Delivery')->count() }}
Direct Deliveries
Supplier direct delivery references
{{ $references->where('type', 'Material Transfer')->count() }}
Material Transfers
Project transfer references
@endif @endsection @push('styles') @endpush @push('scripts') @endpush