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" />
|
<GripVertical :size="18" stroke-width="1.5" class="text-muted-foreground" />
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
||||||
<!-- Posten -->
|
<!-- Title -->
|
||||||
<TableCell colspan="6" class="pt-6">
|
<TableCell colspan="6" class="pt-6">
|
||||||
<Input v-model="element.title" placeholder="Titel"
|
<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" />
|
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>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
|
|
||||||
<TableRow v-else>
|
<TableRow v-else>
|
||||||
<TableCell class="handle px-1 cursor-move w-6">
|
<TableCell class="handle px-1 cursor-move w-6">
|
||||||
<GripVertical :size="18" stroke-width="1.5" class="text-muted-foreground" />
|
<GripVertical :size="18" stroke-width="1.5" class="text-muted-foreground" />
|
||||||
|
|||||||
@@ -148,18 +148,30 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
@foreach ($invoice['items'] as $item)
|
@foreach ($invoice['items'] as $item)
|
||||||
<tr>
|
@if($item['isSection'])
|
||||||
<td>{{ $item['position'] }}</td>
|
<tr class="section-title">
|
||||||
<td>
|
<td colspan="6">
|
||||||
<strong>{{ $item['title'] }}</strong><br>
|
<h3>{{ $item['title'] }}</h3>
|
||||||
{{ $item['description'] }}
|
@if($item['description'])
|
||||||
</td>
|
<p>{{ $item['description'] }}</p>
|
||||||
<td>@toCommaFloat($item['quantity'])</td>
|
@endif
|
||||||
<td>{{ $item['unit'] }}</td>
|
</td>
|
||||||
<td>@toCurrency($item['price'])</td>
|
</tr>
|
||||||
<td>@toCurrency($item['quantity'] * $item['price'])</td>
|
@else
|
||||||
</tr>
|
<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
|
@endforeach
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user