forked from verdnatura/salix-front
fix: refs #7197 reactivity invoiceCorrection
This commit is contained in:
parent
9e078bc074
commit
0a6717171c
|
@ -136,26 +136,12 @@ onBeforeRouteUpdate(async (to, from) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function setInvoiceCorrection(id) {
|
async function setInvoiceCorrection(id) {
|
||||||
const [{ data: correctingData }, { data: correctedData }] = await Promise.all([
|
const { data: correctingData } = await axios.get('InvoiceInCorrections', {
|
||||||
axios.get('InvoiceInCorrections', {
|
params: { filter: { where: { correctingFk: id } } },
|
||||||
params: {
|
});
|
||||||
filter: {
|
const { data: correctedData } = await axios.get('InvoiceInCorrections', {
|
||||||
where: {
|
params: { filter: { where: { correctedFk: id } } },
|
||||||
correctingFk: id,
|
});
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
axios.get('InvoiceInCorrections', {
|
|
||||||
params: {
|
|
||||||
filter: {
|
|
||||||
where: {
|
|
||||||
correctedFk: id,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
|
|
||||||
if (correctingData[0]) invoiceInCorrection.corrected = correctingData[0].correctedFk;
|
if (correctingData[0]) invoiceInCorrection.corrected = correctingData[0].correctedFk;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue