From c3206679f476e7fd001756190024e03f05340ea2 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 6 Jul 2024 03:20:30 +0530 Subject: populated items list and total in print preview --- src/components/PrintPreview.vue | 16 +++-- src/components/PrintPreviewFooter.vue | 68 +++++++++++++++++++ src/components/PrintPreviewHeader.vue | 1 - src/components/PrintPreviewItemsList.vue | 51 +++++++++++---- src/components/invoice_header.vue | 109 +------------------------------ src/components/invoice_items_table.vue | 13 ++-- src/components/sidebar.vue | 4 +- 7 files changed, 129 insertions(+), 133 deletions(-) create mode 100644 src/components/PrintPreviewFooter.vue (limited to 'src/components') diff --git a/src/components/PrintPreview.vue b/src/components/PrintPreview.vue index ecbda88..1e98eb7 100644 --- a/src/components/PrintPreview.vue +++ b/src/components/PrintPreview.vue @@ -1,13 +1,12 @@ @@ -28,4 +29,9 @@ .print-preview p { margin: 0; } +.print-preview { + display: grid; + grid-template-rows: 1fr 2fr auto 1.5fr; + row-gap: 1em; +} diff --git a/src/components/PrintPreviewFooter.vue b/src/components/PrintPreviewFooter.vue new file mode 100644 index 0000000..4594a92 --- /dev/null +++ b/src/components/PrintPreviewFooter.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/components/PrintPreviewHeader.vue b/src/components/PrintPreviewHeader.vue index 33f82f2..4492eb5 100644 --- a/src/components/PrintPreviewHeader.vue +++ b/src/components/PrintPreviewHeader.vue @@ -49,7 +49,6 @@ grid-template-columns: 1.7in 2.4in auto; grid-column-gap: 1em; width: 100%; - margin-bottom: 1em; } .logo-container { display: flex; diff --git a/src/components/PrintPreviewItemsList.vue b/src/components/PrintPreviewItemsList.vue index 72f0fc1..2e81e9a 100644 --- a/src/components/PrintPreviewItemsList.vue +++ b/src/components/PrintPreviewItemsList.vue @@ -12,20 +12,32 @@
Unit Price
Discount
Taxable Value
-
GST
+
+
GST
+
+
%
+
cgst
+
sgst
+
+
Total
-
{{ index + 1 }}
-
{{ item.Name }}
+
{{ index + 1 }}
+
{{ item.Brand }} {{ item.Name }}
{{ item.HSN }}
-
1
-
100
-
0
-
10
-
18
-
1000
+
{{ item.Quantity }}
+
{{ item.UnitPrice }}
+
null
+
{{ item.AmountWithoutGST }}
+
+ +
{{ item.GSTPercentage }}%
+
{{ item.TotalGSTValue.distribute(2)[0] }}
+
{{ item.TotalGSTValue.distribute(2)[1] }}
+
+
{{ item.TotalAmount }}
@@ -33,7 +45,6 @@ diff --git a/src/components/invoice_header.vue b/src/components/invoice_header.vue index fe35980..846c811 100644 --- a/src/components/invoice_header.vue +++ b/src/components/invoice_header.vue @@ -3,112 +3,9 @@ const props = defineProps(["invoice"]) diff --git a/src/components/invoice_items_table.vue b/src/components/invoice_items_table.vue index ad1bf94..8b6c71d 100644 --- a/src/components/invoice_items_table.vue +++ b/src/components/invoice_items_table.vue @@ -27,20 +27,19 @@ const handleDelete = async (id) => { - +
- + - - - + - @@ -72,7 +69,7 @@ const handleDelete = async (id) => { -
# Item NameBrandBrand HSN Unit PriceTaxable Value GST Quantity Amount +
{{ item.Name }} - {{ item.BrandName }} {{ item.Description }} {{ item.BrandName }}{{ item.BrandName }} {{ item.HSN }} {{ item.UnitPrice }}{{ item.AmountWithoutGST }} {{ item.GSTValue }} {{ item.GSTPercentage }}% {{ item.TotalAmount }} +