diff --git a/packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte b/packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte
index f96b4976..8fd6511f 100644
--- a/packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte
+++ b/packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte
@@ -212,25 +212,27 @@
--secondaryColor: {config.colors.secondary};"
>
-
Issued on: {formatDate(request?.contentData?.creationDate)}
-
Due by: {formatDate(request?.contentData?.paymentTerms?.dueDate)}
+
Issued on: {formatDate(request?.contentData?.creationDate || "-")}
+
+ Due by: {formatDate(request?.contentData?.paymentTerms?.dueDate || "-")}
+
- Invoice #{request?.contentData?.invoiceNumber}
+ Invoice #{request?.contentData?.invoiceNumber || "-"}
{isPaid ? "Paid" : "Created"}
From:
-
{request?.payee?.value}
+
{request?.payee?.value || "-"}
{#if sellerInfo.length > 0}
{#each sellerInfo as { label, value }}
- {label}:
- {value}
+ {label || "-"}:
+ {value || "-"}
{/each}
@@ -238,14 +240,14 @@
Billed to:
-
{request?.payer?.value}
+
{request?.payer?.value || "-"}
{#if buyerInfo.length > 0}
{#each buyerInfo as { label, value }}
- {label}:
- {value}
+ {label || "-"}:
+ {value || "-"}
{/each}
@@ -253,11 +255,11 @@
Payment Chain:
- {currency?.network}
+ {currency?.network || "-"}
Invoice Currency:
- {currency?.symbol}
+ {currency?.symbol || "-"}
{#if request?.contentData?.invoiceItems}
@@ -279,12 +281,20 @@
{#each firstItems as item, index (index)}
|
- {item.name}
+ {item.name || "-"}
|
- {item.quantity} |
- {formatUnits(item.unitPrice, currency?.decimals ?? 18)} |
- {formatUnits(item.discount, currency?.decimals ?? 18)} |
- {Number(item.tax.amount)} |
+ {item.quantity || "-"} |
+ {item.unitPrice
+ ? formatUnits(item.unitPrice, currency?.decimals ?? 18)
+ : "-"} |
+ {item.discount
+ ? formatUnits(item.discount, currency?.decimals ?? 18)
+ : "-"} |
+ {Number(item.tax.amount || "-")} |
{truncateNumberString(
formatUnits(
@@ -319,16 +329,21 @@
|
|
- {item.name}
+ {item.name || "-"}
|
- {item.quantity} |
+ {item.quantity || "-"} |
{formatUnits(item.unitPrice, currency?.decimals ?? 18)} | {item.unitPrice
+ ? formatUnits(item.unitPrice, currency?.decimals ?? 18)
+ : "-"}
- {formatUnits(item.discount, currency?.decimals ?? 18)} | {item.discount
+ ? formatUnits(item.discount, currency?.decimals ?? 18)
+ : "-"}
- {Number(item.tax.amount)} |
+ {Number(item.tax.amount || "-")} |
{truncateNumberString(
formatUnits(
@@ -351,7 +366,7 @@
Memo:
- {request.contentData.note}
+ {request.contentData.note || "-"}
{/if}
@@ -359,7 +374,7 @@
{#if request?.contentData?.miscellaneous?.labels}
{#each request?.contentData?.miscellaneous?.labels as label, index (index)}
- {label}
+ {label || "-"}
{/each}
{/if}
@@ -369,7 +384,7 @@
{#if statuses.length > 0 && loading}
{#each statuses as status, index (index)}
- {status}
+ {status || "-"}
{#if (index === 0 && statuses.length === 2) || (index === 1 && statuses.length === 3)}
|