@extends('documents.procurement._layout', [
'documentTitle' => 'Sourcing Trip Overview',
'reference' => $sourcingTrip->trip_reference,
'documentDate' => now()->format('d M Y'),
])
@section('header-meta')
Status: {{ ucwords(str_replace('_', ' ', $sourcingTrip->status)) }}
@if($sourcingTrip->planned_departure)
Planned Departure: {{ \Carbon\Carbon::parse($sourcingTrip->planned_departure)->format('d M Y') }}
@endif
@endsection
@section('content')
{{-- Trip details block --}}
@if($sourcingTrip->title)
| Title |
{{ $sourcingTrip->title }} |
@endif
| Destination Countries |
{{ implode(', ', $sourcingTrip->destination_countries ?? []) ?: '—' }}
|
@if($sourcingTrip->source_currency_code)
| Source Currency |
{{ $sourcingTrip->source_currency_code }}
@if($sourcingTrip->exchange_rate)
@ {{ number_format($sourcingTrip->exchange_rate, 4) }} to base
@endif
|
@endif
@if($sourcingTrip->estimated_total_expenditure)
| Trip Budget |
{{ number_format($sourcingTrip->estimated_total_expenditure, 2) }}
{{ $sourcingTrip->source_currency_code }}
@if($sourcingTrip->estimated_total_expenditure_base)
≈ {{ number_format($sourcingTrip->estimated_total_expenditure_base, 2) }} base
@endif
|
@endif
@if($sourcingTrip->planned_departure)
| Planned Departure |
{{ \Carbon\Carbon::parse($sourcingTrip->planned_departure)->format('d M Y') }} |
@endif
@if($sourcingTrip->actual_departure)
| Actual Departure |
{{ \Carbon\Carbon::parse($sourcingTrip->actual_departure)->format('d M Y') }} |
@endif
@if($sourcingTrip->return_date)
| Return Date |
{{ \Carbon\Carbon::parse($sourcingTrip->return_date)->format('d M Y') }} |
@endif
@if($sourcingTrip->notes)
| Notes |
{{ $sourcingTrip->notes }} |
@endif
{{-- Team members --}}
@if($sourcingTrip->members && $sourcingTrip->members->count())
Team Members
| Name |
Role |
Notes |
@foreach($sourcingTrip->members as $member)
| {{ $member->user?->name ?? '—' }} |
{{ $member->role }} |
{{ $member->notes ?? '—' }} |
@endforeach
@endif
{{-- Items --}}
Trip Items ({{ $sourcingTrip->items->count() }} product{{ $sourcingTrip->items->count() !== 1 ? 's' : '' }})
@if($sourcingTrip->items->count())
| # |
Product |
SKU |
Planned Qty |
UoM |
Est. Unit Price |
Est. Total ({{ $sourcingTrip->source_currency_code ?? '' }}) |
Supplier |
@php $estGrandTotal = 0; @endphp
@foreach($sourcingTrip->items as $i => $item)
@php $estGrandTotal += (float)($item->estimated_total_source_cost ?? 0); @endphp
| {{ $i + 1 }} |
{{ $item->product?->name ?? '—' }} |
{{ $item->product?->sku ?? '—' }} |
{{ number_format($item->planned_quantity, 0) }} |
{{ $item->quantity_uom ?? $item->product?->uom ?? '—' }} |
{{ $item->estimated_unit_source_price ? number_format($item->estimated_unit_source_price, 2) : '—' }}
|
{{ $item->estimated_total_source_cost ? number_format($item->estimated_total_source_cost, 2) : '—' }}
|
{{ $item->supplier?->name ?? '—' }} |
@endforeach
@if($estGrandTotal > 0)
| Total ({{ $sourcingTrip->source_currency_code ?? '' }}) |
{{ number_format($estGrandTotal, 2) }} |
|
@endif
@else
No items have been added to this trip yet.
@endif
@endsection