feat: transfer an invoice
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javi Gallego 2024-09-03 15:25:36 +02:00
parent ea8fde49ff
commit 5b53e9dc37
2 changed files with 17 additions and 8 deletions

View File

@ -26,7 +26,6 @@ const { notify } = useNotify();
const checked = ref(true);
const transferInvoiceParams = reactive({
id: $props.invoiceOutData?.id,
refFk: $props.invoiceOutData?.ref,
});
const rectificativeTypeOptions = ref([]);
@ -46,7 +45,6 @@ const makeInvoice = async () => {
cplusRectificationTypeFk: transferInvoiceParams.cplusRectificationTypeFk,
invoiceCorrectionTypeFk: transferInvoiceParams.invoiceCorrectionTypeFk,
newClientFk: transferInvoiceParams.newClientFk,
refFk: transferInvoiceParams.refFk,
siiTypeInvoiceOutFk: transferInvoiceParams.siiTypeInvoiceOutFk,
makeInvoice: checked.value,
};
@ -74,7 +72,7 @@ const makeInvoice = async () => {
}
}
const { data } = await axios.post('InvoiceOuts/transferInvoice', params);
const { data } = await axios.post('InvoiceOuts/transfer', params);
notify(t('Transferred invoice'), 'positive');
const id = data?.[0];
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });

View File

@ -228,11 +228,19 @@ const showTransferInvoiceForm = async () => {
</QItemSection>
<QMenu anchor="top end" self="top start">
<QList>
<QItem v-ripple clickable @click="refundInvoice(true)">
<QItemSection>{{ t('With warehouse') }}</QItemSection>
<QItem v-ripple clickable @click="refundInvoice(true, false)">
<QItemSection>{{ t('With warehouse, no invoice') }}</QItemSection>
</QItem>
<QItem v-ripple clickable @click="refundInvoice(false)">
<QItemSection>{{ t('Without warehouse') }}</QItemSection>
<QItem v-ripple clickable @click="refundInvoice(false, false)">
<QItemSection>{{ t('Without warehouse, no invoice') }}</QItemSection>
</QItem>
<QItem v-ripple clickable @click="refundInvoice(true, true)">
<QItemSection>{{ t('With warehouse, with invoice') }}</QItemSection>
</QItem>
<QItem v-ripple clickable @click="refundInvoice(false, true)">
<QItemSection>{{
t('Without warehouse, with invoice')
}}</QItemSection>
</QItem>
</QList>
</QMenu>
@ -255,7 +263,10 @@ es:
As CSV: como CSV
Send PDF: Enviar PDF
Send CSV: Enviar CSV
With warehouse: Con almacén
With warehouse, no invoice: Con almacén, sin factura
Without warehouse, no invoice: Sin almacén, sin factura
With warehouse, with invoice: Con almacén, con factura
Without warehouse, with invoice: Sin almacén, con factura
Without warehouse: Sin almacén
InvoiceOut deleted: Factura eliminada
Confirm deletion: Confirmar eliminación