Goods Issue: {{ $goodsIssue->issue_number }}

@if ($goodsIssue->status === 'draft') @can('goods-issue-post') @endcan @can('goods-issue-edit') Edit @endcan @endif @if ($goodsIssue->canAcceptSupplementaryItems()) @can('goods-issue-edit') @endcan @endif
@push('header') @endpush

{{ config('app.name') }}
Goods Issue Note
Printed by: {{ auth()->user()->name }} | {{ now()->format('d-M-Y h:i A') }}

@if ($goodsIssue->posted_at) @else @endif @if ($goodsIssue->notes) @endif
Issue Number: {{ $goodsIssue->issue_number }} Issue Date: {{ \Carbon\Carbon::parse($goodsIssue->issue_date)->format('d-M-Y') }}
Status: {{ ucfirst($goodsIssue->status) }} Warehouse: {{ $goodsIssue->warehouse->warehouse_name }}
Salesman: {{ $goodsIssue->employee->name }} ({{ $goodsIssue->employee->employee_code }}) Vehicle: {{ $goodsIssue->vehicle->vehicle_number }} ({{ $goodsIssue->vehicle->vehicle_type }})
Supplier: {{ $goodsIssue->supplier->supplier_name ?? 'N/A' }}Posted At: {{ $goodsIssue->posted_at->format('d-M-Y h:i A') }}
Notes: {{ $goodsIssue->notes }}
@php $grandTotal = $goodsIssue->items->sum(function ($item) { return $item->calculated_total ?? $item->total_value; }); $totalQty = $goodsIssue->items->sum('quantity_issued'); @endphp @foreach ($goodsIssue->items as $item) @endforeach
Sr# Product Code Product Name Qty Issued UOM Batch Breakdown Total Value
{{ $item->line_no }} {{ $item->product->product_code }} {{ $item->product->product_name }} @if($item->exclude_promotional) Non-Promo @endif @if($item->is_supplementary) Supplementary @endif {{ number_format($item->quantity_issued, 2) }} {{ $item->uom->uom_name }} @if(isset($item->batch_breakdown) && count($item->batch_breakdown) > 0) @if(count($item->batch_breakdown) === 1) @php $b = $item->batch_breakdown[0]; @endphp {{ number_format($b['quantity'], 0) }} × ₨{{ number_format($b['selling_price'], 2) }} = ₨{{ number_format($b['value'], 2) }} @if($b['is_promotional']) 🎁 Promo @endif @else @foreach($item->batch_breakdown as $b)
{{ number_format($b['quantity'], 0) }} × ₨{{ number_format($b['selling_price'], 2) }} = ₨{{ number_format($b['value'], 2) }} @if($b['is_promotional']) 🎁 @endif
@endforeach @endif @else Avg: ₨{{ number_format($item->unit_cost, 2) }} @endif
₨{{ number_format($item->calculated_total ?? $item->total_value, 2) }}
Grand Total {{ number_format($totalQty, 2) }} ₨{{ number_format($grandTotal, 2) }}
{{-- Append-items navigation confirmation: clicking "Add More Items" opens this modal first so the user explicitly agrees they intend to add items to *this* GI (rather than create a new one). --}}