@extends('layouts.dashboard') @section('content')
Created {{ $order->created_at?->format('d M Y, h:i A') }}
| Product | SKU / Barcode | Price | Qty | Total | Stock |
|---|---|---|---|---|---|
|
{{ $item->name_snapshot }}
|
{{ $item->sku_snapshot }}
{{ $item->barcode_snapshot ?: 'No barcode' }}
{{ strtoupper(str_replace('_', ' ', $item->fulfillment_source ?: 'van')) }}
{{ strtoupper($item->fulfillment_status ?: 'ready') }}
|
AED {{ number_format((float) $item->unit_price, 2) }} | {{ number_format((float) $item->qty, 2) }} | AED {{ number_format((float) $item->line_total, 2) }} | @if($item->stock_movement_id) Deducted @elseif(in_array($order->status, ['draft', 'quoted'], true)) Pending @else Not deducted @endif |
| Subtotal | AED {{ number_format((float) $order->subtotal, 2) }} | ||||
| {{ $order->invoice_type === 'cash' ? 'Cash Discount' : 'Discount' }} | − AED {{ number_format((float) $order->discount_total, 2) }} | ||||
| Grand Total | AED {{ number_format((float) $order->grand_total, 2) }} | ||||
Append-only record of deductions and reversals.
| Type | Product | Before | Change | After | Date |
|---|---|---|---|---|---|
| {{ ucfirst($movement->movement_type) }} | {{ $movement->orderItem?->sku_snapshot ?: 'Product #'.$movement->product_id }} | {{ number_format((float) $movement->qty_before, 2) }} | {{ (float) $movement->qty_change > 0 ? '+' : '' }} {{ number_format((float) $movement->qty_change, 2) }} | {{ number_format((float) $movement->qty_after, 2) }} | {{ $movement->created_at?->format('d M Y, h:i A') }} |
Cancelling a confirmed order returns its deducted quantities to the van.