aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
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;