|
6 | 6 | <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm fixed-top"> |
7 | 7 | <div class="container-fluid"> |
8 | 8 | <h1 class="navbar-brand mb-0" href="#"> |
9 | | - {{ money($invoice->total, $invoice->currency) }} {{ $invoice->currency }} |
10 | | - {{--@if($invoice->accepted_at) |
11 | | - <small><span class="badge badge-success">{{ ucfirst(__('laravel-crm::lang.accepted')) }}</span></small> |
12 | | - @elseif($invoice->rejected_at) |
13 | | - <small><span class="badge badge-danger">{{ ucfirst(__('laravel-crm::lang.rejected')) }}</span></small> |
14 | | - @elseif(\Carbon\Carbon::now() <= $invoice->expire_at) |
15 | | - <small><span class="badge badge-secondary">{{ ucfirst(__('laravel-crm::lang.expires_in')) }} {{ $invoice->expire_at->diffForHumans() }}</span></small> |
16 | | - @else |
17 | | - <small><span class="badge badge-danger">{{ ucfirst(__('laravel-crm::lang.invoice_expired')) }}</span></small> |
18 | | - @endif--}} |
| 9 | + {{ money($invoice->total, $invoice->currency) }} <small>{{ $invoice->currency }}</small> |
| 10 | + @if($invoice->fully_paid_at) |
| 11 | + <small><span class="badge badge-success">{{ ucfirst(__('laravel-crm::lang.paid')) }}</span></small> |
| 12 | + @elseif(! $invoice->fully_paid_at && $invoice->due_date >= \Carbon\Carbon::now()) |
| 13 | + <small><span class="badge badge-secondary">{{ ucfirst(__('laravel-crm::lang.due_in')) }} {{ $invoice->due_date->diffForHumans() }} </span></small> |
| 14 | + @elseif(! $invoice->fully_paid_at && $invoice->due_date < \Carbon\Carbon::now()) |
| 15 | + <small><span class="badge badge-danger">{{ $invoice->due_date->diffForHumans() }} {{ ucfirst(__('laravel-crm::lang.overdue')) }} </span></small> |
| 16 | + @endif |
19 | 17 | </h1> |
20 | 18 | <div class="collapse navbar-collapse" id="navbarSupportedContent"> |
21 | | - <ul class="navbar-nav ml-auto"> |
22 | | - {{-- @if($invoice->accepted_at) |
| 19 | + {{--<ul class="navbar-nav ml-auto"> |
| 20 | + @if($invoice->fully_paid_at) |
23 | 21 | <div class="alert alert-success m-0" role="alert"> |
24 | | - {{ ucfirst(__('laravel-crm::lang.you_have_accepted_this_invoice')) }}. |
| 22 | + {{ ucfirst(__('laravel-crm::lang.you_have_paid_this_invoice')) }}. |
25 | 23 | </div> |
26 | | - @elseif($invoice->rejected_at) |
27 | | - <div class="alert alert-danger m-0" role="alert"> |
28 | | - {{ ucfirst(__('laravel-crm::lang.you_have_rejected_this_invoice')) }}. |
29 | | - </div> |
30 | | - @elseif(\Carbon\Carbon::now() <= $invoice->expire_at) |
| 24 | + @else |
31 | 25 | <li class="nav-item mr-2"> |
32 | 26 | <form action="{{ url()->current() }}?signature={{ request()->input('signature') }}" method="POST" class="form-check-inline mr-0"> |
33 | 27 | {{ csrf_field() }} |
34 | | - <x-form-input name="action" value="accept" type="hidden" /> |
35 | | - <button class="btn btn-outline-success" type="submit">{{ ucfirst(__('laravel-crm::lang.accept')) }}</button> |
| 28 | + <x-form-input name="action" value="pay" type="hidden" /> |
| 29 | + <button class="btn btn-outline-success" type="submit">{{ ucfirst(__('laravel-crm::lang.pay_now')) }}</button> |
36 | 30 | </form> |
37 | 31 | </li> |
38 | | - <li class="nav-item mr-2"> |
39 | | - <form action="{{ url()->current() }}?signature={{ request()->input('signature') }}" method="POST" class="form-check-inline mr-0"> |
40 | | - {{ csrf_field() }} |
41 | | - <x-form-input name="action" value="reject" type="hidden" /> |
42 | | - <button class="btn btn-outline-danger" type="submit">{{ ucfirst(__('laravel-crm::lang.reject')) }}</button> |
43 | | - </form> |
44 | | - </li> |
45 | | - @endif--}} |
46 | | - {{--<li class="nav-item"> |
47 | | - <a class="btn btn-outline-secondary" href="#">Download</a> |
48 | | - </li>--}} |
49 | | - </ul> |
| 32 | + @endif |
| 33 | + <li class="nav-item"> |
| 34 | + <a class="btn btn-outline-secondary" href="#">PDF</a> |
| 35 | + </li> |
| 36 | + </ul>--}} |
50 | 37 | </div> |
51 | 38 | </div> |
52 | 39 | </nav> |
|
105 | 92 | @if($invoice->reference) |
106 | 93 | <div class="row py-1"> |
107 | 94 | <div class="col-3"> |
108 | | - <strong>{{ ucfirst(__('laravel-crm::lang.reference')) }}</strong> |
| 95 | + <strong>{{ ucfirst(__('laravel-crm::lang.invoice_number')) }}</strong> |
109 | 96 | </div> |
110 | 97 | <div class="col"> |
111 | | - {{ $invoice->reference }} |
| 98 | + {{ $invoice->invoice_id }} |
112 | 99 | </div> |
113 | 100 | </div> |
114 | 101 | @endif |
115 | 102 | @if($invoice->issue_date) |
116 | 103 | <div class="row py-1"> |
117 | 104 | <div class="col-3"> |
118 | | - <strong>{{ ucfirst(__('laravel-crm::lang.issue_date')) }}</strong> |
| 105 | + <strong>{{ ucfirst(__('laravel-crm::lang.issued')) }}</strong> |
119 | 106 | </div> |
120 | 107 | <div class="col"> |
121 | 108 | {{ $invoice->issue_date->toFormattedDateString() }} |
|
125 | 112 | @if($invoice->due_date) |
126 | 113 | <div class="row py-1"> |
127 | 114 | <div class="col-3"> |
128 | | - <strong>{{ ucfirst(__('laravel-crm::lang.due_date')) }}</strong> |
| 115 | + <strong>{{ ucfirst(__('laravel-crm::lang.due')) }}</strong> |
129 | 116 | </div> |
130 | 117 | <div class="col"> |
131 | 118 | {{ $invoice->due_date->toFormattedDateString() }} |
| 119 | + @if(! $invoice->fully_paid_at && $invoice->due_date >= \Carbon\Carbon::now()) |
| 120 | + <small class="text-secondary"> ({{ ucfirst(__('laravel-crm::lang.due_in')) }} {{ $invoice->due_date->diffForHumans() }})</small> |
| 121 | + @elseif(! $invoice->fully_paid_at && $invoice->due_date < \Carbon\Carbon::now()) |
| 122 | + <small class="text-danger"> ({{ $invoice->due_date->diffForHumans() }} {{ ucfirst(__('laravel-crm::lang.overdue')) }})</small> |
| 123 | + @endif |
132 | 124 | </div> |
133 | 125 | </div> |
134 | 126 | @endif |
|
147 | 139 | </div> |
148 | 140 | </div> |
149 | 141 | </div> |
150 | | - <hr /> |
| 142 | + <hr class="mb-5" /> |
151 | 143 | <div class="row py-1"> |
152 | 144 | <div class="col px-5 py-1"> |
153 | 145 | <table class="table table-hover mb-0"> |
|
0 commit comments