Normalize invoice statuses
This commit is contained in:
@@ -125,12 +125,14 @@ onMount(() => {
|
||||
Amount:<Euro amount={tot.amount}/><br/>
|
||||
VAT: <Euro amount={tot.vat}/><br/>
|
||||
{/each}
|
||||
</section>
|
||||
|
||||
<div class="table_scroll">
|
||||
<div class="table_scroll" style="text-align: initial;">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Time</td>
|
||||
<td>ID</td>
|
||||
<td>Amount</td>
|
||||
<td>VAT</td>
|
||||
<td>Country</td>
|
||||
@@ -142,6 +144,7 @@ onMount(() => {
|
||||
{#each invoices as row (row.id)}
|
||||
<tr>
|
||||
<td>{formatDate(row.time)}</td>
|
||||
<td>{row.id}</td>
|
||||
<td><Euro amount={row.amount}/></td>
|
||||
<td><Euro amount={row.vat}/></td>
|
||||
<td>{row.country}</td>
|
||||
@@ -149,11 +152,9 @@ onMount(() => {
|
||||
<td>{row.status}</td>
|
||||
</tr>
|
||||
{/each}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
.toolbar {
|
||||
|
@@ -130,13 +130,13 @@ onMount(() => {
|
||||
<td>{row.country}</td>
|
||||
<td>{row.payment_method}</td>
|
||||
<td>
|
||||
{#if row.status === "InvoiceCreated" || row.status === "open" || row.status === "CREATED" || row.status === "PAYER_ACTION_REQUIRED"}
|
||||
{#if row.status === "open"}
|
||||
Waiting for payment
|
||||
{:else if row.status === "InvoiceProcessing"}
|
||||
{:else if row.status === "processing"}
|
||||
Payment received, waiting for confirmations
|
||||
{:else if row.status === "InvoiceSettled" || row.status === "paid"}
|
||||
{:else if row.status === "paid"}
|
||||
Paid
|
||||
{:else if row.status === "InvoiceExpired"}
|
||||
{:else if row.status === "expired"}
|
||||
Expired
|
||||
{:else if row.status === "canceled"}
|
||||
Canceled
|
||||
@@ -145,12 +145,7 @@ onMount(() => {
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{#if row.status === "New" ||
|
||||
row.status === "InvoiceCreated" ||
|
||||
row.status === "open" ||
|
||||
row.status === "CREATED" ||
|
||||
row.status === "PAYER_ACTION_REQUIRED"
|
||||
}
|
||||
{#if row.status === "open"}
|
||||
<a href="/api/user/pay_invoice/{row.id}" class="button button_highlight">
|
||||
<i class="icon">paid</i> Pay
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user