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