refactor: refs #6739 updated transferInvoice function
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-05-07 11:27:39 +02:00
parent 7befca94bd
commit bc1a79ac68
1 changed files with 11 additions and 4 deletions

View File

@ -80,6 +80,16 @@ const handleScroll = async () => {
}
};
const transferInvoice = async () => {
const params = {
id: transferInvoiceParams.id,
cplusRectificationTypeFk: transferInvoiceParams.cplusRectificationTypeFk,
invoiceCorrectionTypeFk: transferInvoiceParams.invoiceCorrectionTypeFk,
newClientFk: transferInvoiceParams.newClientFk,
refFk: transferInvoiceParams.refFk,
siiTypeInvoiceOutFk: transferInvoiceParams.siiTypeInvoiceOutFk,
checked: checked.value,
};
try {
const clientDetails = await axios.get(
`Clients/${transferInvoiceParams.newClientFk}`
@ -94,10 +104,7 @@ const transferInvoice = async () => {
},
});
const { data } = await axios.post(
'InvoiceOuts/transferInvoice',
transferInvoiceParams
);
const { data } = await axios.post('InvoiceOuts/transferInvoice', params);
notify(t('Transferred invoice'), 'positive');
closeForm();
router.push('InvoiceOutSummary', { id: data.id });