@php
$invoiceItem = App\Models\InvoiceItem::where(
'invoice_id',
$invoice->id,
)->get();
@endphp
@forelse ($invoiceItem as $item)
|
{{ $item->product?->name }} - {{ $item->product?->barcode }}
|
@if ($item->product->unit->related_unit == null)
{{-- ONLY MAIN UNIT --}}
@else
{{-- HAS SUB UNIT --}}
@endif
|
|
{{--
| --}}
|
|
@empty
| No Invoice Found |
@endforelse