forked from verdnatura/salix-front
chore: refs #6900 mv rectificative logic
This commit is contained in:
parent
88b6d7c9ae
commit
81ed679a2b
|
@ -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 } } },
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue