Line item sections in PDF template, fixes #41
This commit is contained in:
@@ -114,7 +114,7 @@ const recalculatePositions = () => {
|
||||
<GripVertical :size="18" stroke-width="1.5" class="text-muted-foreground" />
|
||||
</TableCell>
|
||||
|
||||
<!-- Posten -->
|
||||
<!-- Title -->
|
||||
<TableCell colspan="6" class="pt-6">
|
||||
<Input v-model="element.title" placeholder="Titel"
|
||||
class="font-bold text-base! p-1 h-7! m-0 -mb-1 bg-transparent dark:bg-transparent hover:bg-background/66 dark:hover:bg-background/66 border-none hover:border-1 dark:hover:border-1 placeholder:text-muted-foreground/30 shadow-none" />
|
||||
@@ -132,6 +132,7 @@ const recalculatePositions = () => {
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
|
||||
<TableRow v-else>
|
||||
<TableCell class="handle px-1 cursor-move w-6">
|
||||
<GripVertical :size="18" stroke-width="1.5" class="text-muted-foreground" />
|
||||
|
||||
@@ -148,7 +148,17 @@
|
||||
<tbody>
|
||||
|
||||
@foreach ($invoice['items'] as $item)
|
||||
<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>
|
||||
@@ -159,7 +169,9 @@
|
||||
<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