Skip to content

Commit 3ab8aaf

Browse files
committed
fix: admin error
1 parent d6bce93 commit 3ab8aaf

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

resources/views/components/backend/ui/recent-update-invoice.blade.php

+11-10
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
case 'overdue':
3232
$color = 'danger';
3333
break;
34-
34+
3535
default:
3636
# code...
3737
break;
@@ -41,15 +41,16 @@
4141
<div class="card h-100 shadow border-top">
4242
<div class="card-body">
4343
<h5>ID:{{ $invoice->id }}</h5>
44-
<h5>{{ str($invoice->client->name)->title() }} <br> <span
45-
class="text-muted fw-normal fs-6">Company:
44+
<h5>{{ str($invoice->client->name)->title() }} <br> <span class="text-muted fw-normal fs-6">Company:
4645
{{ str($invoice->client->company_name)->title() }}</span></h5>
47-
<p class='text-muted mb-0'>Issued:
48-
{{ Carbon\Carbon::parse($invoice->currentFiscal[0]->pivot->issue_date)->format('d F, Y') }}
49-
</p>
50-
<p class='text-muted mb-0'>Due:
51-
{{ Carbon\Carbon::parse($invoice->currentFiscal[0]->pivot->due_date)->format('d F, Y') }}
52-
</p>
46+
@isset($invoice->currentFiscal[0])
47+
<p class='text-muted mb-0'>Issued:
48+
{{ Carbon\Carbon::parse($invoice->currentFiscal[0]->pivot->issue_date)->format('d F, Y') }}
49+
</p>
50+
<p class='text-muted mb-0'>Due:
51+
{{ Carbon\Carbon::parse($invoice->currentFiscal[0]->pivot->due_date)->format('d F, Y') }}
52+
</p>
53+
@endisset
5354
</div>
5455
<div
5556
class="bg-soft-{{ $color }} text-{{ $color }} w-100 p-1 text-center fw-bold rounded-bottom">
@@ -58,4 +59,4 @@ class="bg-soft-{{ $color }} text-{{ $color }} w-100 p-1 text-center fw-bold roun
5859
</div>
5960
</div>
6061
@endforeach
61-
</div>
62+
</div>

0 commit comments

Comments
 (0)