Add Items to Goods Issue: {{ $goodsIssue->issue_number }}

@if ($draftSettlement)

Draft Settlement Exists

A draft settlement {{ $draftSettlement->settlement_number }} already exists for this Goods Issue. After adding items here, you must edit that draft settlement manually to include the new items, otherwise they will be excluded from the reconciliation.

@endif @if ($goodsIssue->status === 'issued')

Note: This Goods Issue has already been posted. New items added here will be posted automatically (a separate journal entry will be created for the supplementary stock movement).

@endif
{{-- Read-only GI info --}}
Supplier
{{ $goodsIssue->supplier->supplier_name ?? '-' }}
Issue Date
{{ $goodsIssue->issue_date->format('Y-m-d') }}
Warehouse
{{ $goodsIssue->warehouse->warehouse_name ?? '-' }}
Salesman
{{ $goodsIssue->employee->name ?? '-' }}
Vehicle
{{ $goodsIssue->vehicle->vehicle_number ?? '-' }} ({{ ucfirst($goodsIssue->status) }})
{{-- Existing items (read-only) --}}

Existing Items on this GI

@foreach ($goodsIssue->items as $existingItem) @endforeach
Line Product Qty Issued UOM Unit Cost Total Value Type
{{ $existingItem->line_no }} {{ $existingItem->product->product_name ?? '-' }} {{ number_format($existingItem->quantity_issued, 2) }} {{ $existingItem->uom->uom_name ?? '-' }} {{ number_format($existingItem->unit_cost, 2) }} {{ number_format($existingItem->total_value, 2) }} @if ($existingItem->is_supplementary) Supplementary @else Original @endif
{{-- New items form --}}

Add New Items

@csrf Totals:
Append Items to {{ $goodsIssue->issue_number }}
{{-- Append-items submit confirmation lives inside the form's x-data scope so it binds directly via Alpine reactivity. --}}
@push('scripts') @endpush