@if($invoice->due_amount <= 0)
Paid
@else
Due
@endif
@if($invoice->notes && strpos($invoice->notes, 'Generated from Invoice') !== false)
Generated
@else
Created
@endif
@php
$showNttnCostIcon = false;
// Check if any item in the invoice has connection type "NTTN Include"
foreach ($invoice->items as $item) {
if ($item->connectionType) {
$connectionTypeName = strtolower(trim($item->connectionType->name ?? ''));
// Check if connection type name contains "nttn" and "include"
if (strpos($connectionTypeName, 'nttn') !== false && strpos($connectionTypeName, 'include') !== false) {
$showNttnCostIcon = true;
break;
}
}
}
@endphp
@if($showNttnCostIcon)
@endif
@endforeach
Showing {{ $invoices->firstItem() }} to {{ $invoices->lastItem() }} of {{ $invoices->total() }} invoices
{{ $invoices->links() }}
@else
No invoices found for current month ({{ $currentMonthDisplay ?? $currentMonth }}).
@endif
Confirm Delete
Are you sure you want to delete this sales invoice? This action cannot be undone.