Skip to content

Commit 134d006

Browse files
committed
allow to display additional data in pdf
1 parent 603e958 commit 134d006

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

config/invoices.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
'email' => null,
5555
'phone_number' => null,
5656
'tax_number' => null,
57+
'company_number' => null,
5758
],
5859

5960
'default_logo' => null,

resources/views/default.blade.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,18 @@
264264
<p class="pb-1">{{ $phone_number }}</p>
265265
@endif
266266
@if ($tax_number = data_get($invoice->seller, 'tax_number'))
267-
<p>{{ $tax_number }}</p>
267+
<p class="pb-1">{{ $tax_number }}</p>
268268
@endif
269+
@if ($company_number = data_get($invoice->seller, 'company_number'))
270+
<p class="pb-1">{{ $company_number }}</p>
271+
@endif
272+
@foreach (data_get($invoice->seller, 'data', []) as $key => $item)
273+
@if (is_string($key))
274+
<p class="pb-1">{{ $key }}: {{ $item }}</p>
275+
@else
276+
<p class="pb-1">{{ $item }}</p>
277+
@endif
278+
@endforeach
269279
</td>
270280
<td class="align-top" width="50%">
271281
@if ($name = data_get($invoice->buyer, 'name'))
@@ -293,8 +303,18 @@
293303
<p class="pb-1">{{ $phone_number }}</p>
294304
@endif
295305
@if ($tax_number = data_get($invoice->buyer, 'tax_number'))
296-
<p>{{ $tax_number }}</p>
306+
<p class="pb-1">{{ $tax_number }}</p>
297307
@endif
308+
@if ($company_number = data_get($invoice->buyer, 'company_number'))
309+
<p class="pb-1">{{ $company_number }}</p>
310+
@endif
311+
@foreach (data_get($invoice->buyer, 'data', []) as $key => $item)
312+
@if (is_string($key))
313+
<p class="pb-1">{{ $key }}: {{ $item }}</p>
314+
@else
315+
<p class="pb-1">{{ $item }}</p>
316+
@endif
317+
@endforeach
298318
</td>
299319
</tr>
300320
</tbody>

0 commit comments

Comments
 (0)