Browse Source

tunig line item list

feature/document
Stephan Richter 4 months ago
parent
commit
32e2d91ee6
  1. 4
      frontend/src/routes/document/Position.svelte
  2. 16
      frontend/src/routes/document/PositionList.svelte

4
frontend/src/routes/document/Position.svelte

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
<tr>
<td>{pos.number}</td>
<td>{pos.item}</td>
<td>{pos.title}</td>
<td class="title">{pos.title}</td>
<td>{pos.amount}</td>
<td>{pos.unit}</td>
<td>{pos.unit_price/100}&nbsp;{currency}</td>
@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
<td>{pos.tax}&nbsp;%</td>
</tr>
<tr>
<td class="error">buttons</td>
<td class="error"><br/></td>
<td colspan="6">{@html pos.description}</td>
<td></td>
</tr>

16
frontend/src/routes/document/PositionList.svelte

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
var { document = $bindable(null) } = $props();
</script>
{#if document.positions}
<table>
<table class="positions">
<thead>
<tr>
<th>{t('document.pos')}</th>
@ -21,9 +21,17 @@ @@ -21,9 +21,17 @@
</tr>
</thead>
<tbody>
{#each Object.entries(document.positions) as [id,pos]}
<Position currency={document.currency} bind:pos={document.positions[id]} />
{/each}
{#each Object.entries(document.positions) as [id,pos]}
<Position currency={document.currency} bind:pos={document.positions[id]} />
{/each}
<tr class="sums">
<td colspan="2"></td>
<td>{t('document.net_sum')}</td>
<td>{document.net_sum/100}&nbsp;{document.currency}</td>
<td colspan="2">{t('document.gros_sum')}</td>
<td>{document.gross_sum/100}&nbsp;{document.currency}</td>
<td></td>
</tr>
</tbody>
</table>
{/if}
Loading…
Cancel
Save