refactor(EntryPreAccount): refs #8277 rename accountType to fiscalCode and update related data fetching
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-04-17 16:27:00 +02:00
parent 412e04b1ff
commit 200b1ab329
3 changed files with 16 additions and 14 deletions

View File

@ -39,7 +39,7 @@ const table = useTemplateRef('table');
const companies = ref([]); const companies = ref([]);
const countries = ref([]); const countries = ref([]);
const entryTypes = ref([]); const entryTypes = ref([]);
const entryAccounts = ref([]); const supplierFiscalTypes = ref([]);
const warehouses = ref([]); const warehouses = ref([]);
const defaultDmsDescription = ref(); const defaultDmsDescription = ref();
const dmsTypeId = ref(); const dmsTypeId = ref();
@ -165,13 +165,14 @@ const columns = computed(() => [
}, },
}, },
{ {
name: 'accountType', name: 'fiscalCode',
label: t('entry.preAccount.accountType'), label: t('entry.preAccount.fiscalCode'),
format: ({ fiscalCode }) => t(fiscalCode),
columnFilter: { columnFilter: {
component: 'select', component: 'select',
name: 'accountType', name: 'fiscalCode',
options: entryAccounts.value, options: supplierFiscalTypes.value,
optionLabel: 'type', optionLabel: 'locale',
optionValue: 'code', optionValue: 'code',
sortBy: 'code', sortBy: 'code',
}, },
@ -327,10 +328,11 @@ async function createInvoice() {
auto-load auto-load
/> />
<FetchData <FetchData
url="EntryAccounts" url="supplierFiscalTypes"
:filter="{ fields: ['code', 'type'] }" :filter="{ fields: ['code'] }"
@on-fetch=" @on-fetch="
(data) => (entryAccounts = data.map((x) => ({ ...x, type: t(x.type) }))) (data) =>
(supplierFiscalTypes = data.map((x) => ({ locale: t(x.code), ...x })))
" "
auto-load auto-load
/> />
@ -466,10 +468,10 @@ async function createInvoice() {
en: en:
IntraCommunity: Intra-community IntraCommunity: Intra-community
NonCommunity: Non-community NonCommunity: Non-community
CanaryIsland: Canary Islands CanaryIslands: Canary Islands
es: es:
IntraCommunity: Intracomunitario IntraCommunity: Intracomunitaria
NonCommunity: Extracomunitario NonCommunity: Extracomunitaria
CanaryIsland: Islas Canarias CanaryIsland: Islas Canarias
National: Nacional National: Nacional
</i18n> </i18n>

View File

@ -135,7 +135,7 @@ entry:
isReceived: R isReceived: R
entryType: Entry type entryType: Entry type
isAgricultural: Agricultural isAgricultural: Agricultural
accountType: Account type fiscalCode: Account type
daysAgo: Max 365 days daysAgo: Max 365 days
search: Search search: Search
searchInfo: You can search by supplier name or nickname searchInfo: You can search by supplier name or nickname

View File

@ -86,7 +86,7 @@ entry:
isReceived: R isReceived: R
entryType: Tipo de entrada entryType: Tipo de entrada
isAgricultural: Agricultural isAgricultural: Agricultural
accountType: Tipo de cuenta fiscalCode: Tipo de cuenta
daysAgo: Máximo 365 días daysAgo: Máximo 365 días
search: Buscar search: Buscar
searchInfo: Puedes buscar por nombre o alias de proveedor searchInfo: Puedes buscar por nombre o alias de proveedor