diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/PrintPreviewItemsList.vue | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/components/PrintPreviewItemsList.vue b/src/components/PrintPreviewItemsList.vue index 1b105e2..5af13b6 100644 --- a/src/components/PrintPreviewItemsList.vue +++ b/src/components/PrintPreviewItemsList.vue @@ -5,39 +5,39 @@ <template> <div class="items-list-wrapper"> <div class="items-list-header"> - <div class="cell">#</div> - <div class="cell">Item Name</div> - <div class="cell">HSN</div> - <div class="cell">Qty</div> - <div class="cell">Unit Price</div> - <div class="cell">Discount</div> - <div class="cell">Taxable Value</div> + <div class="cell padded-cell">#</div> + <div class="cell padded-cell">Item Name</div> + <div class="cell padded-cell">HSN</div> + <div class="cell padded-cell">Qty</div> + <div class="cell padded-cell">Unit Price</div> + <div class="cell padded-cell">Discount</div> + <div class="cell padded-cell">Taxable Value</div> <div class="cell nested-col-header"> <div>GST</div> <div class="nested-col"> - <div class="nested-cell">%</div> - <div class="nested-cell">cgst</div> - <div class="nested-cell nested-cell-last">sgst</div> + <div class="nested-cell padded-cell">%</div> + <div class="nested-cell padded-cell">cgst</div> + <div class="nested-cell nested-cell-last padded-cell">sgst</div> </div> </div> <div class="cell">Total</div> </div> <div class="item-list"> <div v-for="(item, index) in props.items" :key="item['id']" class="item-list-row"> - <div class="cell text-center">{{ index + 1 }}</div> - <div class="cell">{{ item.Brand }} {{ item.Name }}</div> - <div class="cell">{{ item.HSN }}</div> - <div class="cell">{{ item.Quantity }}</div> - <div class="cell">{{ item.UnitPrice }}</div> - <div class="cell">0.00</div> - <div class="cell">{{ item.AmountWithoutGST }}</div> + <div class="cell padded-cell">{{ index + 1 }}</div> + <div class="cell padded-cell">{{ item.Brand }} {{ item.Name }}</div> + <div class="cell padded-cell">{{ item.HSN }}</div> + <div class="cell padded-cell">{{ item.Quantity }}</div> + <div class="cell padded-cell">{{ item.UnitPrice }}</div> + <div class="cell padded-cell">0.00</div> + <div class="cell padded-cell">{{ item.AmountWithoutGST }}</div> <div class="cell nested-col"> <!-- TODO: check if cgst+sgst or igst needs to be calculated --> - <div class="nested-cell">{{ item.GSTPercentage }}%</div> - <div class="nested-cell">{{ item.TotalGSTValue.distribute(2)[0] }}</div> - <div class="nested-cell nested-cell-last">{{ item.TotalGSTValue.distribute(2)[1] }}</div> + <div class="nested-cell padded-cell">{{ item.GSTPercentage }}%</div> + <div class="nested-cell padded-cell">{{ item.TotalGSTValue.distribute(2)[0] }}</div> + <div class="nested-cell nested-cell-last padded-cell">{{ item.TotalGSTValue.distribute(2)[1] }}</div> </div> - <div class="cell">{{ item.TotalAmount }}</div> + <div class="cell padded-cell">{{ item.TotalAmount }}</div> </div> </div> </div> @@ -52,6 +52,9 @@ border-right: 1px solid gray; border-bottom: 1px solid gray; } +.padded-cell { + padding: 0.1em 0.2em; +} .items-list-header, .item-list-row { display: grid; grid-template-columns: 0.3fr 3fr 0.8fr 0.8fr 1fr 1fr 1.1fr 2fr 0.8fr; |