From c3206679f476e7fd001756190024e03f05340ea2 Mon Sep 17 00:00:00 2001
From: Vidhu Kant Sharma <vidhukant@vidhukant.com>
Date: Sat, 6 Jul 2024 03:20:30 +0530
Subject: populated items list and total in print preview

---
 src/components/invoice_items_table.vue | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

(limited to 'src/components/invoice_items_table.vue')

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) => {
     </div>
   </div>
 
-  <table v-else :class="`invoice-items-table table table-striped table-hover ${props.preview ? 'table-light' : ''}`">
+  <table v-else :class="`invoice-items-table table table-striped table-hover`">
     <thead>
       <tr>
         <th scope="col">#</th>
         <th scope="col">Item Name</th>
-        <th v-if="!props.preview" scope="col">Brand</th>
+        <th scope="col">Brand</th>
         <th scope="col">HSN</th>
         <th scope="col">Unit Price</th>
-        <th v-if="props.preview" scope="col">Taxable Value</th>
         <th scope="col">GST</th>
         <th scope="col">Quantity</th>
         <th scope="col">Amount</th>
 
-        <th v-if="!props.preview" scope="col" class="table-action-column">
+        <th scope="col" class="table-action-column">
           <div class="wrapper">
             <button class="btn btn-dark" v-on:click="emit('refresh')">
               <i class="bi bi-arrow-clockwise"></i>
@@ -56,14 +55,12 @@ const handleDelete = async (id) => {
         <td class="item-name-cell multi-row">
           <span>{{ item.Name }}</span>
           <span class="text-muted">
-            <span v-if="props.preview">{{ item.BrandName }}</span>
             {{ item.Description }}
           </span>
         </td>
-        <td v-if="!props.preview">{{ item.BrandName }}</td>
+        <td>{{ item.BrandName }}</td>
         <td>{{ item.HSN }}</td>
         <td>{{ item.UnitPrice }}</td>
-        <td v-if="props.preview">{{ item.AmountWithoutGST }}</td>
         <td>
           {{ item.GSTValue }} <span class="sup text-muted">{{ item.GSTPercentage }}%</span>
         </td>
@@ -72,7 +69,7 @@ const handleDelete = async (id) => {
         </td>
         <td>{{ item.TotalAmount }}</td>
 
-        <td v-if="!props.preview" class="table-action-column">
+        <td class="table-action-column">
           <div class="wrapper">
             <button class="btn" data-bs-toggle="dropdown" aria-expanded="false">
               <i class="bi bi-caret-down-fill"></i>
-- 
cgit v1.2.3

