0
0
Fork 0

refs #6595 fix invoiceInBasicData

This commit is contained in:
Alex Moreno 2024-01-11 13:12:55 +01:00
parent 7b974a2f32
commit 489ea94d3f
1 changed files with 5 additions and 15 deletions

View File

@ -144,18 +144,6 @@ function supplierRefFilter(val) {
where = Object.assign(where, params);
suppliersRef.value.fetch({ where });
}
function currencyRefFilter(val) {
let where = { limit: 30 };
let params = {};
let key = 'code';
if (new RegExp(/\d/g).test(val)) {
key = 'id';
}
params = { [key]: { like: `%${val}%` } };
where = Object.assign(where, params);
currenciesRef.value.fetch({ where });
}
</script>
<template>
<FetchData
@ -169,6 +157,7 @@ function currencyRefFilter(val) {
:filter="{ fields: ['id', 'code'] }"
order="code"
@on-fetch="(data) => (currencies = data)"
auto-load
/>
<FetchData
ref="companiesRef"
@ -176,6 +165,7 @@ function currencyRefFilter(val) {
:filter="{ fields: ['id', 'code'] }"
order="code"
@on-fetch="(data) => (companies = data)"
auto-load
/>
<FetchData
ref="dmsTypesRef"
@ -183,6 +173,7 @@ function currencyRefFilter(val) {
:filter="{ fields: ['id', 'name'] }"
order="name"
@on-fetch="(data) => (dmsTypes = data)"
auto-load
/>
<FetchData
ref="warehousesRef"
@ -190,11 +181,13 @@ function currencyRefFilter(val) {
:filter="{ fields: ['id', 'name'] }"
order="name"
@on-fetch="(data) => (warehouses = data)"
auto-load
/>
<FetchData
ref="allowTypesRef"
url="DmsContainers/allowedContentTypes"
@on-fetch="(data) => (allowedContentTypes = data)"
auto-load
/>
<FetchData
url="UserConfigs/getUserConfig"
@ -431,9 +424,6 @@ function currencyRefFilter(val) {
:options="currencies"
option-value="id"
option-label="code"
:input-debounce="100"
:default-filter="false"
@input-value="currencyRefFilter"
/>
</div>
<div class="col">