From ac8996cefaa27359a6f62cc570484b501903e6e2 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 9 Jul 2024 06:10:12 +0530 Subject: added invoice note and total in words --- src/classes/user.ts | 6 +++- src/components/InvoiceHeaderEditor.vue | 1 + src/components/PrintPreview.vue | 4 ++- src/components/PrintPreviewFooter.vue | 37 ++++++++++++++++++++++--- src/components/PrintPreviewRecipientDetails.vue | 24 ++++++++-------- src/views/ViewInvoice.vue | 6 +--- 6 files changed, 55 insertions(+), 23 deletions(-) diff --git a/src/classes/user.ts b/src/classes/user.ts index dc18717..d2fb3c4 100644 --- a/src/classes/user.ts +++ b/src/classes/user.ts @@ -6,7 +6,9 @@ export default class User { Email: string Website: string Username: string - IsVerified: bool + DefaultInvoiceNote: string + Details: string + IsVerified: boolean constructor() { this.FullName = '' @@ -16,6 +18,8 @@ export default class User { this.Email = '' this.Website = '' this.Username = '' + this.DefaultInvoiceNote = '' + this.Details = '' this.IsVerified = false } } diff --git a/src/components/InvoiceHeaderEditor.vue b/src/components/InvoiceHeaderEditor.vue index d0bf81e..5b1f925 100644 --- a/src/components/InvoiceHeaderEditor.vue +++ b/src/components/InvoiceHeaderEditor.vue @@ -96,6 +96,7 @@ const submit = async (e: Event) => { "issuerfirmemail": u.Email, "issuerfirmwebsite": u.Website, "issuerfirmdetails": u.Details, + "note": u.DefaultInvoiceNote, }) route.push({ name: "edit-invoice", params: { id: res.data.data.ID }}) diff --git a/src/components/PrintPreview.vue b/src/components/PrintPreview.vue index b733310..a4344b7 100644 --- a/src/components/PrintPreview.vue +++ b/src/components/PrintPreview.vue @@ -14,8 +14,10 @@ + :items="props.invoice.Items" + :total="props.total"/> diff --git a/src/components/PrintPreviewFooter.vue b/src/components/PrintPreviewFooter.vue index 48c9e51..61837ed 100644 --- a/src/components/PrintPreviewFooter.vue +++ b/src/components/PrintPreviewFooter.vue @@ -1,14 +1,30 @@