Make tax information scrollable on small screens

This commit is contained in:
2023-11-04 16:57:28 +01:00
parent aa1b24cd71
commit 63b8c759ba
2 changed files with 39 additions and 37 deletions

View File

@@ -101,46 +101,48 @@ onMount(get_payments);
<h3>Taxes per country</h3>
<table>
<tr>
<td>Country</td>
<td>Payments</td>
<td>Amount</td>
<td>VAT</td>
<td>VAT%</td>
<td>Total</td>
</tr>
{#each Object.entries(per_country) as [country, row]}
<tr>
<td>{country}</td>
<td>{row.count}</td>
<td><Euro amount={row.amount}/></td>
<td><Euro amount={row.vat}/></td>
<td>{row.vat_fraction*100}%</td>
<td><Euro amount={row.vat+row.amount}/></td>
</tr>
{/each}
<tr>
<td>Total</td>
<td>{totals.count}</td>
<td><Euro amount={totals.amount}/></td>
<td><Euro amount={totals.vat}/></td>
<td></td>
<td><Euro amount={totals.vat+totals.amount}/></td>
</tr>
{#if per_country.NL}
<div class="table_scroll">
<table>
<tr>
<td>Total - NL</td>
<td>{totals.count - per_country.NL.count}</td>
<td><Euro amount={totals.amount-per_country.NL.amount}/></td>
<td><Euro amount={totals.vat-per_country.NL.vat}/></td>
<td>Country</td>
<td>Payments</td>
<td>Amount</td>
<td>VAT</td>
<td>VAT%</td>
<td>Total</td>
</tr>
{#each Object.entries(per_country) as [country, row]}
<tr>
<td>{country}</td>
<td>{row.count}</td>
<td><Euro amount={row.amount}/></td>
<td><Euro amount={row.vat}/></td>
<td>{row.vat_fraction*100}%</td>
<td><Euro amount={row.vat+row.amount}/></td>
</tr>
{/each}
<tr>
<td>Total</td>
<td>{totals.count}</td>
<td><Euro amount={totals.amount}/></td>
<td><Euro amount={totals.vat}/></td>
<td></td>
<td><Euro amount={(totals.vat-per_country.NL.vat)+(totals.amount-per_country.NL.amount)}/></td>
<td><Euro amount={totals.vat+totals.amount}/></td>
</tr>
{/if}
</table>
{#if per_country.NL}
<tr>
<td>Total - NL</td>
<td>{totals.count - per_country.NL.count}</td>
<td><Euro amount={totals.amount-per_country.NL.amount}/></td>
<td><Euro amount={totals.vat-per_country.NL.vat}/></td>
<td></td>
<td><Euro amount={(totals.vat-per_country.NL.vat)+(totals.amount-per_country.NL.amount)}/></td>
</tr>
{/if}
</table>
</div>
<h3>All payments ({payments.length})</h3>
<div class="table_scroll">