Merge branch 'Fix-InvoiceInDescriptorDialog' of https://gitea.verdnatura.es/verdnatura/salix-front into Fix-InvoiceInDescriptorDialog
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
f8bcc74133
|
@ -6,7 +6,6 @@ import axios from 'axios';
|
|||
import { toCurrency, toDate } from 'src/filters';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||
import InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.vue';
|
||||
|
||||
|
@ -17,10 +16,6 @@ const { t } = useI18n();
|
|||
const cardDescriptorRef = ref();
|
||||
const entityId = computed(() => $props.id || +currentRoute.value.params.id);
|
||||
const totalAmount = ref();
|
||||
const config = ref();
|
||||
const cplusRectificationTypes = ref([]);
|
||||
const siiTypeInvoiceIns = ref([]);
|
||||
const invoiceCorrectionTypes = ref([]);
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
|
@ -115,28 +110,6 @@ async function setInvoiceCorrection(id) {
|
|||
}
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
url="InvoiceInConfigs"
|
||||
:where="{ fields: ['sageWithholdingFk'] }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (config = data)"
|
||||
/>
|
||||
<FetchData
|
||||
url="CplusRectificationTypes"
|
||||
@on-fetch="(data) => (cplusRectificationTypes = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="SiiTypeInvoiceIns"
|
||||
:where="{ code: { like: 'R%' } }"
|
||||
@on-fetch="(data) => (siiTypeInvoiceIns = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="InvoiceCorrectionTypes"
|
||||
@on-fetch="(data) => (invoiceCorrectionTypes = data)"
|
||||
auto-load
|
||||
/>
|
||||
<CardDescriptor
|
||||
ref="cardDescriptorRef"
|
||||
module="InvoiceIn"
|
||||
|
|
|
@ -13,6 +13,7 @@ import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
|||
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import InvoiceInToBook from '../InvoiceInToBook.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
|
||||
const { hasAny } = useAcl();
|
||||
const { t } = useI18n();
|
||||
|
@ -34,6 +35,9 @@ const invoiceInCorrection = reactive({ correcting: [], corrected: null });
|
|||
const entityId = computed(() => $props.invoice.id || +currentRoute.value.params.id);
|
||||
const invoiceIn = computed(() => arrayData.store.data);
|
||||
const isNotFilled = computed(() => Object.values(correctionFormData).includes(null));
|
||||
const invoiceCorrectionTypes = ref([]);
|
||||
const cplusRectificationTypes = ref([]);
|
||||
const siiTypeInvoiceIns = ref([]);
|
||||
const actions = {
|
||||
unbook: {
|
||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.unbook') }),
|
||||
|
@ -54,7 +58,7 @@ const actions = {
|
|||
const correctionFormData = reactive({
|
||||
invoiceReason: 2,
|
||||
invoiceType: 2,
|
||||
invoiceClass: 6,
|
||||
invoiceClass: 8,
|
||||
});
|
||||
const canEditProp = (props) =>
|
||||
hasAny([{ model: 'InvoiceIn', props, accessType: 'WRITE' }]);
|
||||
|
@ -152,6 +156,28 @@ const createInvoiceInCorrection = async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="InvoiceCorrectionTypes"
|
||||
@on-fetch="(data) => (invoiceCorrectionTypes = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="CplusRectificationTypes"
|
||||
@on-fetch="(data) => (cplusRectificationTypes = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="SiiTypeInvoiceIns"
|
||||
:where="{ code: { like: 'R%' } }"
|
||||
@on-fetch="(data) => (siiTypeInvoiceIns = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="InvoiceInConfigs"
|
||||
:where="{ fields: ['sageWithholdingFk'] }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (config = data)"
|
||||
/>
|
||||
<InvoiceInToBook>
|
||||
<template #content="{ book }">
|
||||
<QItem
|
||||
|
@ -243,7 +269,21 @@ const createInvoiceInCorrection = async () => {
|
|||
option-value="id"
|
||||
option-label="description"
|
||||
:required="true"
|
||||
/>
|
||||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
{{ console.log('opt: ', opt) }}
|
||||
<QItemSection>
|
||||
<QItemLabel
|
||||
>{{ opt.id }} -
|
||||
{{ opt.description }}</QItemLabel
|
||||
>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<div></div>
|
||||
</template>
|
||||
</VnSelect>
|
||||
|
||||
<VnSelect
|
||||
:label="`${useCapitalize(t('globals.reason'))}`"
|
||||
v-model="correctionFormData.invoiceReason"
|
||||
|
|
Loading…
Reference in New Issue