Skip to content

Commit

Permalink
Fix: Ensure 5 invoice limit in backend and frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
anisAronno committed Mar 28, 2023
1 parent cfd85fe commit b3bb005
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Resources/views/customer_fields_view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@foreach($invoices as $inv)
@if($inv->id == $subscription->latest_invoice)
<span class="price">{{$inv->currency_symbol}}{{number_format($inv->total/100, 2)}}</span>
<span class="date-time">{{date('M d, h:i A', $inv->created)}}</span>
<span class="date-time">{{date('M d Y, h:i A', $inv->created)}}</span>
@endif
@endforeach

Expand All @@ -38,12 +38,14 @@
<div class="invoices">
<p class="invoice-title">{{__('Payments')}}<p>
@forelse($invoices as $key => $invoice)
<div class="invoice {{ $loop->first ? 'first-invoice' : ''}}" >
<span class="price">{{$invoice->currency_symbol}}{{number_format($invoice->total/100, 2)}}</span>
<span class="status">{{$invoice->status}}</span>
<a href="{{$invoice->invoice_pdf}}">#invoice</a>
<span class="date-time">{{date('M d, h:i A', $invoice->created)}}</span>
</div>
@if($loop->iteration <= 5)
<div class="invoice {{ $loop->first ? 'first-invoice' : ''}}" >
<span class="price">{{$invoice->currency_symbol}}{{number_format($invoice->total/100, 2)}}</span>
<span class="status">{{$invoice->status}}</span>
<a href="{{$invoice->invoice_pdf}}">#invoice</a>
<span class="date-time">{{date('M d Y, h:i A', $invoice->created)}}</span>
</div>
@endif
@empty
<p>{{__('No Invoice found')}}</p>
@endforelse
Expand Down

0 comments on commit b3bb005

Please sign in to comment.