0
0
Fork 0

chore: refs #6900 mv rectificative logic

This commit is contained in:
Jorge Penadés 2024-08-09 09:11:35 +02:00
parent 88b6d7c9ae
commit 81ed679a2b
1 changed files with 2 additions and 2 deletions

View File

@ -131,8 +131,6 @@ onBeforeMount(async () => {
onBeforeRouteUpdate(async (to, from) => { onBeforeRouteUpdate(async (to, from) => {
if (to.params.id !== from.params.id) { if (to.params.id !== from.params.id) {
invoiceInCorrection.correcting.length = 0;
invoiceInCorrection.corrected = null;
await setInvoiceCorrection(to.params.id); await setInvoiceCorrection(to.params.id);
const { data } = await axios.get(`InvoiceIns/${to.params.id}/getTotals`); const { data } = await axios.get(`InvoiceIns/${to.params.id}/getTotals`);
totalAmount.value = data.totalDueDay; totalAmount.value = data.totalDueDay;
@ -140,6 +138,8 @@ onBeforeRouteUpdate(async (to, from) => {
}); });
async function setInvoiceCorrection(id) { async function setInvoiceCorrection(id) {
invoiceInCorrection.correcting.length = 0;
invoiceInCorrection.corrected = null;
const { data: correctingData } = await axios.get('InvoiceInCorrections', { const { data: correctingData } = await axios.get('InvoiceInCorrections', {
params: { filter: { where: { correctingFk: id } } }, params: { filter: { where: { correctingFk: id } } },
}); });