Line item sections in PDF template, fixes #41
This commit is contained in:
@@ -148,18 +148,30 @@
|
||||
<tbody>
|
||||
|
||||
@foreach ($invoice['items'] as $item)
|
||||
<tr>
|
||||
<td>{{ $item['position'] }}</td>
|
||||
<td>
|
||||
<strong>{{ $item['title'] }}</strong><br>
|
||||
{{ $item['description'] }}
|
||||
</td>
|
||||
<td>@toCommaFloat($item['quantity'])</td>
|
||||
<td>{{ $item['unit'] }}</td>
|
||||
<td>@toCurrency($item['price'])</td>
|
||||
<td>@toCurrency($item['quantity'] * $item['price'])</td>
|
||||
</tr>
|
||||
@if($item['isSection'])
|
||||
<tr class="section-title">
|
||||
<td colspan="6">
|
||||
<h3>{{ $item['title'] }}</h3>
|
||||
@if($item['description'])
|
||||
<p>{{ $item['description'] }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr class="line-item">
|
||||
<td>{{ $item['position'] }}</td>
|
||||
<td>
|
||||
<strong>{{ $item['title'] }}</strong><br>
|
||||
{{ $item['description'] }}
|
||||
</td>
|
||||
<td>@toCommaFloat($item['quantity'])</td>
|
||||
<td>{{ $item['unit'] }}</td>
|
||||
<td>@toCurrency($item['price'])</td>
|
||||
<td>@toCurrency($item['quantity'] * $item['price'])</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user