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 { toCurrency, toDate } from 'src/filters';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.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 SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
import InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.vue';
|
import InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.vue';
|
||||||
|
|
||||||
|
@ -17,10 +16,6 @@ const { t } = useI18n();
|
||||||
const cardDescriptorRef = ref();
|
const cardDescriptorRef = ref();
|
||||||
const entityId = computed(() => $props.id || +currentRoute.value.params.id);
|
const entityId = computed(() => $props.id || +currentRoute.value.params.id);
|
||||||
const totalAmount = ref();
|
const totalAmount = ref();
|
||||||
const config = ref();
|
|
||||||
const cplusRectificationTypes = ref([]);
|
|
||||||
const siiTypeInvoiceIns = ref([]);
|
|
||||||
const invoiceCorrectionTypes = ref([]);
|
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
include: [
|
include: [
|
||||||
|
@ -115,28 +110,6 @@ async function setInvoiceCorrection(id) {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<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
|
<CardDescriptor
|
||||||
ref="cardDescriptorRef"
|
ref="cardDescriptorRef"
|
||||||
module="InvoiceIn"
|
module="InvoiceIn"
|
||||||
|
|
|
@ -13,6 +13,7 @@ import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||||
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import InvoiceInToBook from '../InvoiceInToBook.vue';
|
import InvoiceInToBook from '../InvoiceInToBook.vue';
|
||||||
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
|
|
||||||
const { hasAny } = useAcl();
|
const { hasAny } = useAcl();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -34,6 +35,9 @@ const invoiceInCorrection = reactive({ correcting: [], corrected: null });
|
||||||
const entityId = computed(() => $props.invoice.id || +currentRoute.value.params.id);
|
const entityId = computed(() => $props.invoice.id || +currentRoute.value.params.id);
|
||||||
const invoiceIn = computed(() => arrayData.store.data);
|
const invoiceIn = computed(() => arrayData.store.data);
|
||||||
const isNotFilled = computed(() => Object.values(correctionFormData).includes(null));
|
const isNotFilled = computed(() => Object.values(correctionFormData).includes(null));
|
||||||
|
const invoiceCorrectionTypes = ref([]);
|
||||||
|
const cplusRectificationTypes = ref([]);
|
||||||
|
const siiTypeInvoiceIns = ref([]);
|
||||||
const actions = {
|
const actions = {
|
||||||
unbook: {
|
unbook: {
|
||||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.unbook') }),
|
title: t('assertAction', { action: t('invoicein.descriptorMenu.unbook') }),
|
||||||
|
@ -54,7 +58,7 @@ const actions = {
|
||||||
const correctionFormData = reactive({
|
const correctionFormData = reactive({
|
||||||
invoiceReason: 2,
|
invoiceReason: 2,
|
||||||
invoiceType: 2,
|
invoiceType: 2,
|
||||||
invoiceClass: 6,
|
invoiceClass: 8,
|
||||||
});
|
});
|
||||||
const canEditProp = (props) =>
|
const canEditProp = (props) =>
|
||||||
hasAny([{ model: 'InvoiceIn', props, accessType: 'WRITE' }]);
|
hasAny([{ model: 'InvoiceIn', props, accessType: 'WRITE' }]);
|
||||||
|
@ -152,6 +156,28 @@ const createInvoiceInCorrection = async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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>
|
<InvoiceInToBook>
|
||||||
<template #content="{ book }">
|
<template #content="{ book }">
|
||||||
<QItem
|
<QItem
|
||||||
|
@ -243,7 +269,21 @@ const createInvoiceInCorrection = async () => {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="description"
|
option-label="description"
|
||||||
:required="true"
|
: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
|
<VnSelect
|
||||||
:label="`${useCapitalize(t('globals.reason'))}`"
|
:label="`${useCapitalize(t('globals.reason'))}`"
|
||||||
v-model="correctionFormData.invoiceReason"
|
v-model="correctionFormData.invoiceReason"
|
||||||
|
|
Loading…
Reference in New Issue