@section('title', 'View Order')
@section('heading', 'View Order')
@section('top-menu-items')
{{ $order->bookings->count() }}
@else0
@endif{{ $order->bookings->sum(fn($b) => $b->passengers->count()) }}
@else0
@endif| Item Name | Type | Price | Qty | Participant |
|---|---|---|---|---|
| {{ $addon->name ?? 'N/A' }} | {{ $addon->type ?? 'N/A' }} | {{ $addon->price ?? 'N/A' }} | {{ $addon->qty ?? 1 }} | {{ $addon->passenger_name ?? 'N/A' }} |
| No Store Items | ||||
| Product | Price | QTY | Subtotal | Tax |
|---|---|---|---|---|
|
{{ $tourName }} - {{ $passengerType }} - {{ $passengerFullName }}
Order ID: {{ $orderId }} -
Booking ID: {{ $bookingId }} -
Participant ID: {{ $passengerId }}
Participant Name: {{ $passengerFullName }} Tour Name: {{ $tourName }} Booking Date: {{ $bookingDate }} Pricing: {{ $passengerType }}: @if($passengerPrice < 0) -${{ number_format(abs($passengerPrice), 2) }} @else ${{ number_format($passengerPrice, 2) }} @endif |
{{ number_format($passengerPrice, 2) }} |
{{ $passengerQty }} |
{{ number_format($passengerPrice, 2) }} |
@if ($hasTaxes)
@foreach ($passengerTaxes as $tax)
@php
$taxDisplay = $tax->percentage ? $tax->percentage . '%' : '$' . number_format($tax->price, 2);
$taxFormatted = $tax->price < 0
? '-$' . number_format(abs($tax->price), 2)
: '$' . number_format($tax->price, 2);
@endphp
{{ $tax->name }} ({{ $taxDisplay }}): {{ $taxFormatted }} @endforeach @elseNo Taxes @endif |
|
{{ $discountName }}{{ $discountSuffix }}
|
{{ number_format($discountAmount, 2) }} |
{{ $discountQty }} |
{{ number_format($discountAmount, 2) }} |
@if ($taxAdjustmentDisplay != 0) {{ number_format($taxAdjustmentDisplay, 2) }} @else - @endif |
|
{{ $lineItemName }}
|
{{ number_format($lineItemPrice, 2) }} |
{{ $lineItemQty }} |
{{ number_format($lineItemSubtotal, 2) }} |
@if ($lineItemTaxes->isNotEmpty())
@foreach ($lineItemTaxes as $tax)
@php
$isPercentage = ($tax['type'] ?? '') === 'percentage';
$taxRate = (float) ($tax['value'] ?? 0);
$calculatedTax = $isPercentage ? ($lineItemSubtotal * $taxRate) / 100 : $taxRate;
$taxDisplay = $isPercentage
? rtrim(rtrim(number_format($taxRate, 2), '0'), '.') . '%'
: '$' . number_format($taxRate, 2);
$taxFormatted = $calculatedTax < 0
? '-$' . number_format(abs($calculatedTax), 2)
: '$' . number_format($calculatedTax, 2);
@endphp
{{ $tax['name'] ?? 'Tax' }} ({{ $taxDisplay }}): {{ $taxFormatted }} @endforeach @elseNo Taxes @endif |
|
{{ $addonNameDisplay }}{{ $addonPriceDisplay }}
|
{{ number_format($addonPrice, 2) }}
|
{{ $addonQtyDisplay }} |
{{ number_format($addonSubtotal, 2) }} |
@if (!empty($taxes))
@foreach ($taxes as $tax)
@php
$isPercentage = ($tax['type'] ?? '') === 'percentage';
$calculated = $isPercentage
? ($addonPrice * ($tax['value'] ?? 0) * $addonQty) / 100
: ($tax['value'] * $addonQty ?? 0);
$taxDisplay = $isPercentage
? ($tax['value'] ?? 0) . '%'
: '$' . ($tax['value'] ?? 0);
$calculatedFormatted = $calculated < 0
? '-$' . number_format(abs($calculated), 2)
: '$' . number_format($calculated, 2);
@endphp
{{ $tax['name'] ?? 'Tax' }} ({{ $taxDisplay }}): {{ $calculatedFormatted }} @endforeach @elseNo Taxes @endif |
|
{{ $discount['name'] ?? 'Discount' }} - {{ $discountDisplay }}
|
{{ number_format($discountCalculated, 2) }} |
{{ $refundQty }} |
{{ number_format($discountCalculated, 2) }} |
{{ $discountIsPercentage ? number_format((-1 * $totalTaxOnDiscount * $discount['value']) / 100, 2) : '-' }} |
|
Total
|
{{ number_format($totalPrice, 2) }}
|
{{ $totalQtySum }}
|
{{ number_format($totalPrice, 2) }}
|
{{ number_format($totalTaxes, 2) }}
|
| Date | Method | Amount | Status | User |
|---|---|---|---|---|
| {{ $payment['created_at'] ? \Carbon\Carbon::parse($payment['created_at'])->format('Y-m-d H:i') : '--' }} | {{ $payment['method_name'] }} | @if ($payment['is_removed']) ${{ number_format($payment['amount'], 2) }} @elseif ($payment['action'] === 'updated' && $payment['previous_amount'] !== null) ${{ number_format($payment['previous_amount'], 2) }} → ${{ number_format($payment['amount'], 2) }} @else ${{ number_format($payment['amount'], 2) }} @endif | @if ($payment['is_removed']) Removed @elseif ($payment['action'] === 'updated') Updated @elseif ($payment['source'] === 'legacy') Legacy @else Recorded @endif | {{ $payment['user_name'] ?? '--' }} |
| No payment history. | ||||
No files uploaded yet.
@endif
{{ $order->orderable->first_name ?? 'Cash Customer' }}
{{ $order->orderable->residential_address ?? 'N/A' }}
{{ $order->orderable->phone ?? 'N/A' }}
| Order # | Booking Date | Tour / Product | Type | Rate | Qty | Subtotal | Discount | Taxes | Total |
|---|---|---|---|---|---|---|---|---|---|
| {{ $firstOrderRow ? $order->id : '' }} | {{-- Only show date and tour name for the first row of booking --}}{{ $firstBookingRow ? \Carbon\Carbon::parse($booking->booking_date)->format('Y-m-d') : '' }} | {{ $firstBookingRow ? ($booking->tour?->name ?? 'N/A') : '' }} | @php $firstBookingRow = false; $firstOrderRow = false; @endphp{{ ucfirst($type) }} | ${{ number_format($group->first()->price, 2) }} | {{ $group->count() }} | ${{ number_format($passengerSubtotal, 2) }} | ${{ number_format($passengerDiscount, 2) }} | ${{ number_format($passengerTaxes, 2) }} | ${{ number_format($passengerTotal, 2) }} |
| {{-- leave booking date empty --}} | {{-- leave tour name empty --}} | {{ $li->name ?? 'lineitem' }} | ${{ number_format($li->price, 2) }} | {{ $qty }} | ${{ number_format($subtotal, 2) }} | ${{ number_format($discount, 2) }} | ${{ number_format($taxes, 2) }} | ${{ number_format($total, 2) }} | |
| {{ \Carbon\Carbon::parse($order->created_at)->format('Y-m-d') }} | {{ $item->name }} | Addon | ${{ number_format($item->price, 2) }} | {{ $qty }} | ${{ number_format($subtotal, 2) }} | ${{ number_format($discount, 2) }} | ${{ number_format($taxes, 2) }} | ${{ number_format($total, 2) }} |
| Subtotal | {{ number_format($order->total_price, 2) }} |
| Discount | {{ number_format($order->discount ?? 0, 2) }} |
| Tax | {{ number_format($order->taxes, 2) }} |
| Total | ${{ number_format(($order->total_price ?? 0) + ($order->taxes ?? 0) + ($order->discount ?? 0), 2) }} |
| Balance Due | ${{ number_format($order->total_price + $order->discount + $order->taxes - ($order->paid ?? 0), 2) }} |