Skip to content

Commit 7364740

Browse files
committed
Updated invoice payment instructions
1 parent c2d8d63 commit 7364740

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

resources/lang/en/lang.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,4 +512,6 @@
512512
'lead_prefix' => 'lead prefix',
513513
'deal_prefix' => 'deal prefix',
514514
'create_and_add_another' => 'create & add another',
515+
'invoice_payment_instructions' => 'invoice payment instructions',
516+
'payment' => 'payment',
515517
];

resources/views/invoices/pdf.blade.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,18 @@
148148
</tr>
149149
</tfoot>
150150
</table>
151+
@if($paymentInstructions)
152+
<table class="table table-bordered table-sm table-items">
153+
<tbody>
154+
<tr>
155+
<td>
156+
<h4>{{ ucfirst(__('laravel-crm::lang.payment')) }}</h4>
157+
{!! nl2br($paymentInstructions) !!}
158+
</td>
159+
</tr>
160+
</tbody>
161+
</table>
162+
@endif
151163
@if($invoice->terms)
152164
<table class="table table-bordered table-sm table-items">
153165
<tbody>

resources/views/portal/invoices/show.blade.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,22 @@
227227
</div>
228228
</div>
229229
<hr class="m-0" />
230-
<div class="row py-1">
231-
<div class="col px-5 py-4">
232-
<h5>{{ ucfirst(__('laravel-crm::lang.terms')) }}</h5>
233-
{!! nl2br($invoice->terms) !!}
230+
@if($paymentInstructions)
231+
<div class="row py-1">
232+
<div class="col px-5 py-4">
233+
<h5>{{ ucfirst(__('laravel-crm::lang.payment')) }}</h5>
234+
{!! nl2br($paymentInstructions) !!}
235+
</div>
234236
</div>
235-
</div>
237+
@endif
238+
@if($invoice->terms)
239+
<div class="row py-1">
240+
<div class="col px-5 py-4">
241+
<h5>{{ ucfirst(__('laravel-crm::lang.terms')) }}</h5>
242+
{!! nl2br($invoice->terms) !!}
243+
</div>
244+
</div>
245+
@endif
236246
</div>
237247
</div>
238248
</div>

src/Http/Controllers/InvoiceController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ public function download(Invoice $invoice)
298298
->loadView('laravel-crm::invoices.pdf', [
299299
'invoice' => $invoice,
300300
'contactDetails' => $this->settingService->get('invoice_contact_details')->value ?? null,
301+
'paymentInstructions' => $this->settingService->get('invoice_payment_instructions')->value ?? null,
301302
'email' => $email ?? null,
302303
'phone' => $phone ?? null,
303304
'address' => $address ?? null,

src/Http/Controllers/Portal/InvoiceController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function show(Request $request, Invoice $invoice)
5555
return view('laravel-crm::portal.invoices.show', [
5656
'invoice' => $invoice,
5757
'contactDetails' => $this->settingService->get('invoice_contact_details')->value ?? null,
58+
'paymentInstructions' => $this->settingService->get('invoice_payment_instructions')->value ?? null,
5859
'email' => $email ?? null,
5960
'phone' => $phone ?? null,
6061
'address' => $address ?? null,

src/Http/Livewire/SendInvoice.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public function send()
7878
->loadView('laravel-crm::invoices.pdf', [
7979
'invoice' => $this->invoice,
8080
'contactDetails' => $this->settingService->get('invoice_contact_details')->value ?? null,
81+
'paymentInstructions' => $this->settingService->get('invoice_payment_instructions')->value ?? null,
8182
'email' => $email ?? null,
8283
'phone' => $phone ?? null,
8384
'address' => $address ?? null,

0 commit comments

Comments
 (0)