feat: refs #8277 add entry type selection and localization to EntryControl
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-03-20 08:57:13 +01:00
parent e00fae2412
commit 234269bdef
3 changed files with 29 additions and 10 deletions

View File

@ -9,6 +9,7 @@ import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue';
const { t } = useI18n();
const companies = ref([]);
const countries = ref([]);
const entryTypes = ref([]);
const columns = computed(() => [
{
name: 'company',
@ -81,7 +82,6 @@ const columns = computed(() => [
component: markRaw(VnSelectSupplier),
label: null,
name: 'supplierFk',
url: 'Suppliers',
},
},
{
@ -89,13 +89,21 @@ const columns = computed(() => [
label: t('globals.country'),
columnFilter: {
component: 'select',
name: 'country',
name: 'countryFk',
options: countries.value,
},
},
{
name: 'description',
label: t('globals.description'),
label: t('entry.control.entryType'),
columnFilter: {
component: 'select',
label: null,
name: 'typeFk',
options: entryTypes.value,
optionLabel: 'description',
optionValue: 'code',
},
},
{
name: 'payDem',
@ -105,6 +113,10 @@ const columns = computed(() => [
name: 'amount',
label: t('globals.amount'),
format: ({ amount }) => toCurrency(amount),
columnFilter: {
component: 'number',
name: 'amount',
},
},
{
name: 'isBooked',
@ -129,10 +141,10 @@ const columns = computed(() => [
// label: t('entry.agencyMode'),
// format: (row) => row.agencyMode,
// },
// {
// name: 'isAgricultural',
// label: t('entry.isAgricultural'),
// },
{
name: 'isAgricultural',
label: t('entry.isAgricultural'),
},
// {
// name: 'account',
// label: t('globals.account'),
@ -156,15 +168,20 @@ const columns = computed(() => [
@on-fetch="(data) => (companies = data)"
auto-load
/>
<FetchData
url="EntryTypes"
:filter="{ fields: ['code', 'description'] }"
@on-fetch="(data) => (entryTypes = data)"
auto-load
/>
<VnTable
data-key="entryControl"
url="Entries/control"
:columns
auto-load
:right-search="false"
:disable-option="{ card: true }"
redirect="Entry"
:order="['landed DESC']"
>
</VnTable>
:right-search="false"
/>
</template>

View File

@ -133,6 +133,7 @@ entry:
payDem: Payment term
isBooked: B
received: R
entryType: Entry type
entryFilter:
params:
isExcludedFromAvailable: Excluded from available

View File

@ -83,6 +83,7 @@ entry:
payDem: Plazo de pago
isBooked: C
received: R
entryType: Tipo de entrada
params:
entryFk: Entrada
observationTypeFk: Tipo de observación