feat: refs #6739 transferInvoice new checkbox and functionality #352

Merged
jon merged 28 commits from 6739-invoiceOut into dev 2024-06-25 12:46:21 +00:00
1 changed files with 11 additions and 4 deletions
Showing only changes of commit bc1a79ac68 - Show all commits

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(
jon marked this conversation as resolved Outdated
Outdated
Review

Al componente VnSelect si le pides el campo hasToInvoiceByAddress en el fields ya te lo devuelve y no hace falta volver a pedir los datos del cliente

Al componente VnSelect si le pides el campo `hasToInvoiceByAddress` en el fields ya te lo devuelve y no hace falta volver a pedir los datos del cliente
`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 });