diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index e2a4fde04..b68069cf8 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -131,8 +131,6 @@ onBeforeMount(async () => { onBeforeRouteUpdate(async (to, from) => { if (to.params.id !== from.params.id) { - invoiceInCorrection.correcting.length = 0; - invoiceInCorrection.corrected = null; await setInvoiceCorrection(to.params.id); const { data } = await axios.get(`InvoiceIns/${to.params.id}/getTotals`); totalAmount.value = data.totalDueDay; @@ -140,6 +138,8 @@ onBeforeRouteUpdate(async (to, from) => { }); async function setInvoiceCorrection(id) { + invoiceInCorrection.correcting.length = 0; + invoiceInCorrection.corrected = null; const { data: correctingData } = await axios.get('InvoiceInCorrections', { params: { filter: { where: { correctingFk: id } } }, });