From 4e7bcb396921860e20be11b11432866600a8d279 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 7 Dec 2023 21:48:43 +0530 Subject: changed print format a bit --- src/classes/invoice_item.ts | 2 +- src/components/invoice_items_table.vue | 30 +++++++++++++++++++++--------- src/views/ViewInvoice.vue | 8 +++++++- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/classes/invoice_item.ts b/src/classes/invoice_item.ts index dcb917a..c3da433 100644 --- a/src/classes/invoice_item.ts +++ b/src/classes/invoice_item.ts @@ -37,6 +37,6 @@ export const calculate = (items: InvoiceItem[]) => items.map((x: InvoiceItem) => , GSTValue: gstValue , TotalGSTValue: totalGSTValue , AmountWithoutGST: amountWithoutGST - , TotalAmount: amountWithoutGST.add(totalGSTValue) + , TotalAmount: amountWithoutGST.multiply(gstPercentage).divide(100).add(amountWithoutGST) }) }) diff --git a/src/components/invoice_items_table.vue b/src/components/invoice_items_table.vue index 285f990..ad1bf94 100644 --- a/src/components/invoice_items_table.vue +++ b/src/components/invoice_items_table.vue @@ -32,12 +32,12 @@ const handleDelete = async (id) => { # Item Name - Description - Brand + Brand HSN Unit Price - GST % - Quantity Unit + Taxable Value + GST + Quantity Amount @@ -53,16 +53,24 @@ const handleDelete = async (id) => { {{ index + 1 }} - {{ item.Name }} - {{ item.Description }} - {{ item.BrandName }} + + {{ item.Name }} + + {{ item.BrandName }} + {{ item.Description }} + + + {{ item.BrandName }} {{ item.HSN }} {{ item.UnitPrice }} + {{ item.AmountWithoutGST }} {{ item.GSTValue }} {{ item.GSTPercentage }}% - {{ item.Quantity }} {{ item.UnitOfMeasure }} - {{ item.TotalAmount }} {{ item.AmountWithoutGST }} + {{ item.TotalGSTValue }} + + {{ item.Quantity }} {{ item.UnitOfMeasure }} + + {{ item.TotalAmount }}
@@ -110,4 +118,8 @@ tbody tr:hover .table-action-column .btn { opacity: 1; transition: opacity 300ms; } +td.multi-row { + display: flex; + flex-direction: column; +} diff --git a/src/views/ViewInvoice.vue b/src/views/ViewInvoice.vue index 68857b4..5f2a783 100644 --- a/src/views/ViewInvoice.vue +++ b/src/views/ViewInvoice.vue @@ -74,7 +74,6 @@ onMounted(() => { font-size: 12pt !important; } #print-preview .sup { - display: none; } #print-preview table { width: 100%; @@ -88,9 +87,16 @@ onMounted(() => { #print-preview .invoice-summary { margin-top: auto !important; } +#print-preview .item-name-cell span { + max-width: 150pt !important; +} @media print { + body { + background-color: white; + } #print-preview { width: auto !important; + height: 100% !important; } #sidebar, #navbar, #print-button, .btn { display: none !important; -- cgit v1.2.3