1+ @extends (' laravel-crm::layouts.portal' )
2+
3+ @section (' content' )
4+
5+ <header >
6+ <nav class =" navbar navbar-expand-md navbar-light bg-white shadow-sm fixed-top" >
7+ <div class =" container-fluid" >
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--}}
19+ </h1 >
20+ <div class =" collapse navbar-collapse" id =" navbarSupportedContent" >
21+ <ul class =" navbar-nav ml-auto" >
22+ {{-- @if($invoice->accepted_at)
23+ <div class="alert alert-success m-0" role="alert">
24+ {{ ucfirst(__('laravel-crm::lang.you_have_accepted_this_invoice')) }}.
25+ </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)
31+ <li class="nav-item mr-2">
32+ <form action="{{ url()->current() }}?signature={{ request()->input('signature') }}" method="POST" class="form-check-inline mr-0">
33+ {{ 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>
36+ </form>
37+ </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 >
50+ </div >
51+ </div >
52+ </nav >
53+ </header >
54+
55+ <main role =" main" class =" flex-shrink-0" >
56+ <div class =" container" >
57+ <div class =" row card shadow-sm mb-4" >
58+ <div class =" card-body p-0" >
59+ <div class =" row" >
60+ <div class =" col px-5 py-4" >
61+ <h1 class =" card-title pricing-card-title py-4 m-0" >{{ ucfirst (__ (' laravel-crm::lang.invoice' )) } } </h1 >
62+ </div >
63+ <div class =" col px-5 py-4 text-right" >
64+ @if ($logo )
65+ <img src =" {{ asset (' storage/' . $logo ) } }" height =" 80" />
66+ @endif
67+ </div >
68+ </div >
69+ <hr class =" m-0" />
70+ <div class =" row" >
71+ <div class =" col px-5 py-4" >
72+ <div class =" row py-1" >
73+ <div class =" col-3" >
74+ <strong >{{ ucfirst (__ (' laravel-crm::lang.to' )) } } </strong >
75+ </div >
76+ <div class =" col" >
77+ {{ $invoice -> organisation -> name ?? $invoice -> organisation -> person -> name } } <br />
78+ @if (isset ($organisation_address ) )
79+ @if ($organisation_address -> line2 )
80+ {{ $organisation_address -> line1 } } <br />
81+ @endif
82+ @if ($organisation_address -> line2 )
83+ {{ $organisation_address -> line2 } } <br />
84+ @endif
85+ @if ($organisation_address -> line3 )
86+ {{ $organisation_address -> line3 } } <br />
87+ @endif
88+ @if ($organisation_address -> city || $organisation_address -> state || $organisation_address -> postcode )
89+ {{ $organisation_address -> city } } {{ $organisation_address -> state } } {{ $organisation_address -> postcode } } <br />
90+ @endif
91+ {{ $organisation_address -> country } }
92+ @elseif ($address )
93+ {{ $address -> line1 } } <br />
94+ @if ($address -> line2 )
95+ {{ $address -> line2 } } <br />
96+ @endif
97+ @if ($address -> line3 )
98+ {{ $address -> line3 } } <br />
99+ @endif
100+ {{ $address -> city } } <br />
101+ {{ $address -> country } }
102+ @endif
103+ </div >
104+ </div >
105+ @if ($invoice -> reference )
106+ <div class =" row py-1" >
107+ <div class =" col-3" >
108+ <strong >{{ ucfirst (__ (' laravel-crm::lang.reference' )) } } </strong >
109+ </div >
110+ <div class =" col" >
111+ {{ $invoice -> reference } }
112+ </div >
113+ </div >
114+ @endif
115+ @if ($invoice -> issue_date )
116+ <div class =" row py-1" >
117+ <div class =" col-3" >
118+ <strong >{{ ucfirst (__ (' laravel-crm::lang.issue_date' )) } } </strong >
119+ </div >
120+ <div class =" col" >
121+ {{ $invoice -> issue_date -> toFormattedDateString () } }
122+ </div >
123+ </div >
124+ @endif
125+ @if ($invoice -> due_date )
126+ <div class =" row py-1" >
127+ <div class =" col-3" >
128+ <strong >{{ ucfirst (__ (' laravel-crm::lang.due_date' )) } } </strong >
129+ </div >
130+ <div class =" col" >
131+ {{ $invoice -> due_date -> toFormattedDateString () } }
132+ </div >
133+ </div >
134+ @endif
135+ </div >
136+ <div class =" col px-5 py-4" >
137+ <div class =" row py-1" >
138+ <div class =" col-3" >
139+ <strong >{{ ucfirst (__ (' laravel-crm::lang.from' )) } } </strong >
140+ </div >
141+ <div class =" col" >
142+ {{ $fromName } } <br />
143+ {{-- 19-21 South Steyne<br />
144+ MANLY NSW 2095<br />
145+ Australia--}}
146+ </div >
147+ </div >
148+ </div >
149+ </div >
150+ <hr />
151+ <div class =" row py-1" >
152+ <div class =" col px-5 py-1" >
153+ <table class =" table table-hover mb-0" >
154+ <thead >
155+ <tr >
156+ <th scope =" col" >{{ ucfirst (__ (' laravel-crm::lang.item' )) } } </th >
157+ <th scope =" col" >{{ ucfirst (__ (' laravel-crm::lang.price' )) } } </th >
158+ <th scope =" col" >{{ ucfirst (__ (' laravel-crm::lang.quantity' )) } } </th >
159+ <th scope =" col" >{{ ucfirst (__ (' laravel-crm::lang.amount' )) } } </th >
160+ </tr >
161+ </thead >
162+ <tbody >
163+ @foreach ($invoice -> invoiceLines ()-> whereNotNull (' product_id' )-> get () as $invoiceLine )
164+ <tr >
165+ <td >{{ $invoiceLine -> product -> name } } </td >
166+ <td >{{ money ($invoiceLine -> price ?? null , $invoiceLine -> currency ) } } </td >
167+ <td >{{ $invoiceLine -> quantity } } </td >
168+ <td >{{ money ($invoiceLine -> amount ?? null , $invoiceLine -> currency ) } } </td >
169+ </tr >
170+ @endforeach
171+ </tbody >
172+ <tfoot >
173+ <tr >
174+ <td ></td >
175+ <td ></td >
176+ <td ><strong >{{ ucfirst (__ (' laravel-crm::lang.sub_total' )) } } </strong ></td >
177+ <td >{{ money ($invoice -> subtotal , $invoice -> currency ) } } </td >
178+ </tr >
179+ @if ($invoice -> discount > 0 )
180+ <tr >
181+ <td ></td >
182+ <td ></td >
183+ <td ><strong >{{ ucfirst (__ (' laravel-crm::lang.discount' )) } } </strong ></td >
184+ <td >{{ money ($invoice -> discount , $invoice -> currency ) } } </td >
185+ </tr >
186+ @endif
187+ <tr >
188+ <td ></td >
189+ <td ></td >
190+ <td ><strong >{{ ucfirst (__ (' laravel-crm::lang.tax' )) } } </strong ></td >
191+ <td >{{ money ($invoice -> tax , $invoice -> currency ) } } </td >
192+ </tr >
193+ {{-- <tr>
194+ <td></td>
195+ <td></td>
196+ <td><strong>{{ ucfirst(__('laravel-crm::lang.adjustment')) }}</strong></td>
197+ <td>{{ money($invoice->adjustments, $invoice->currency) }}</td>
198+ </tr>--}}
199+ <tr >
200+ <td ></td >
201+ <td ></td >
202+ <td ><strong >{{ ucfirst (__ (' laravel-crm::lang.total' )) } } </strong ></td >
203+ <td >{{ money ($invoice -> total , $invoice -> currency ) } } </td >
204+ </tr >
205+ </tfoot >
206+ </table >
207+ </div >
208+ </div >
209+ <hr class =" m-0" />
210+ <div class =" row py-1" >
211+ <div class =" col px-5 py-4" >
212+ <h5 >{{ ucfirst (__ (' laravel-crm::lang.terms' )) } } </h5 >
213+ {!! nl2br ($invoice -> terms ) ! !}
214+ </div >
215+ </div >
216+ </div >
217+ </div >
218+ </div >
219+ </main >
220+
221+ @endsection
0 commit comments