Issued on ${formatDate(invoice.contentData?.creationDate)}
Payment due by ${formatDate(invoice.contentData?.paymentTerms?.dueDate)}
${invoice.payee?.value || "-"}
- ${invoice.contentData?.sellerInfo?.firstName || ""} ${invoice.contentData?.sellerInfo?.lastName || ""}${invoice.payee?.value || "-"}
+${invoice.contentData?.sellerInfo?.firstName || ""} ${invoice.contentData?.sellerInfo?.lastName || ""}
+${renderAddress(invoice.contentData?.sellerInfo)}
+ ${invoice.contentData?.sellerInfo?.taxRegistration ? `VAT: ${invoice.contentData.sellerInfo.taxRegistration}
` : ""}${invoice.payer?.value || "-"}
- ${invoice.contentData?.buyerInfo?.firstName || ""} ${invoice.contentData?.buyerInfo?.lastName || ""}${invoice.payer?.value || "-"}
+${invoice.contentData?.buyerInfo?.firstName || ""} ${invoice.contentData?.buyerInfo?.lastName || ""}
+${renderAddress(invoice.contentData?.buyerInfo)}
+ ${invoice.contentData?.buyerInfo?.taxRegistration ? `VAT: ${invoice.contentData.buyerInfo.taxRegistration}
` : ""}| Description | -Quantity | -Unit Price | -Discount | -Tax | -Amount | +||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Description | +Quantity | +Unit Price | +Discount | +Tax | +Amount | ||||||
| ${item.name || "-"} | -${item.quantity || "-"} | -${ + | ${item.name || "-"} | +${item.quantity || "-"} | +${ item.unitPrice ? formatUnits(BigInt(item.unitPrice), currency?.decimals || 0) : "-" } | -${ + | ${ item.discount ? formatUnits(BigInt(item.discount), currency?.decimals || 0) : "-" } | -${ + | ${ item.tax?.amount ? `${item.tax.amount}%` : "-" } | -${ + | ${ item ? formatUnits( BigInt(calculateItemTotal(item)), @@ -131,8 +156,8 @@ export const exportToPDF = async ( |
| Due: | -${
+ | Due: |
+ ${
invoice.expectedAmount
? `${formatUnits(BigInt(invoice.expectedAmount), currency?.decimals || 0)} ${invoice.currency || ""}`
: "-"
@@ -143,7 +168,7 @@ export const exportToPDF = async (
${
invoice.contentData?.note
- ? ` |
+ ? ` Note:${invoice.contentData.note} | ||||||||