diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2024-07-06 03:20:30 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2024-07-06 03:20:30 +0530 |
commit | c3206679f476e7fd001756190024e03f05340ea2 (patch) | |
tree | 7d643c0dbcd54eff481d4612afe65a4191517ac8 /src/views/EditInvoice.vue | |
parent | 63823d41addec00556a93eabffa455630d169ca6 (diff) |
populated items list and total in print preview
Diffstat (limited to 'src/views/EditInvoice.vue')
-rw-r--r-- | src/views/EditInvoice.vue | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/views/EditInvoice.vue b/src/views/EditInvoice.vue index 0b6fa97..1ea9664 100644 --- a/src/views/EditInvoice.vue +++ b/src/views/EditInvoice.vue @@ -5,7 +5,7 @@ import { useToast } from 'vue-toast-notification' import axios from 'axios' import Invoice from "./../classes/invoice" -import { calculate } from "./../classes/invoice_item" +import { calculateArr } from "./../classes/invoice_item" import invoiceHeader from './../components/invoice_header.vue' import itemSelector from './../components/item_selector.vue' @@ -33,7 +33,7 @@ const getInvoice = async () => { try { const r = await axios.get(`/invoice/${invoiceId}`) invoice.value = r.data.data - items.value = calculate(r.data.data.Items) + items.value = calculateArr(r.data.data.Items) } catch (err) { toast.error('An unhandled exception occoured. Please check logs') console.error(err) @@ -50,7 +50,7 @@ const refreshItems = async () => { try { const res = await axios.get(`/invoice/${invoiceId}/item`) if (res.status === 200) { - items.value = calculate(res.data.data) + items.value = calculateArr(res.data.data) } } catch (err) { toast.error('An unhandled exception occoured. Please check logs') |