aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2024-07-07 22:15:06 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2024-07-07 22:15:06 +0530
commit350105c637626f686369a1a52be08beefb5d88c7 (patch)
treeca0d98198cb6fcd1ced9b5a8fc350912ae34b210 /src/components
parentf192b92ad382d9e8b89ac836bde96f8973ea2844 (diff)
added total in words
Diffstat (limited to 'src/components')
-rw-r--r--src/components/PrintPreviewFooter.vue8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/PrintPreviewFooter.vue b/src/components/PrintPreviewFooter.vue
index 4594a92..48c9e51 100644
--- a/src/components/PrintPreviewFooter.vue
+++ b/src/components/PrintPreviewFooter.vue
@@ -1,6 +1,5 @@
<script setup lang="ts">
- import { toRaw, onMounted } from "vue"
- import { InvoiceTotal } from "./../classes/invoice.ts"
+ import Converter from "number-to-words"
const props = defineProps(["total"])
</script>
@@ -9,7 +8,7 @@
<div class="print-preview-footer">
<div class="footer--col1">
<div class="total-words-label"></div>
- <div class="total-words"></div>
+ <div class="total-words">{{ Number.isFinite(props.total.TotalWithGST.value) && `${Converter.toWords(props.total.TotalWithGST.value)} only` }}</div>
</div>
<div class="footer--col2">
<div class="total-summary">
@@ -36,6 +35,9 @@
</template>
<style>
+.total-words {
+ text-transform: capitalize;
+}
.print-preview-footer {
border: 1px solid gray;
display: grid;