#7936 improve InvoiceIn #1004
|
@ -0,0 +1,4 @@
|
||||||
|
export function useAccountShortToStandard(val) {
|
||||||
|
|||||||
|
if (!val || !/^\d+(\.\d*)$/.test(val)) return;
|
||||||
|
return val?.replace('.', '0'.repeat(11 - val.length));
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||||
import CreateNewExpenseForm from 'src/components/CreateNewExpenseForm.vue';
|
import CreateNewExpenseForm from 'src/components/CreateNewExpenseForm.vue';
|
||||||
import { getExchange } from 'src/composables/getExchange';
|
import { getExchange } from 'src/composables/getExchange';
|
||||||
|
import { useAccountShortToStandard } from 'src/composables/useAccountShortToStandard';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
@ -172,6 +173,13 @@ const formatOpt = (row, { model, options }, prop) => {
|
||||||
:option-label="col.optionLabel"
|
:option-label="col.optionLabel"
|
||||||
:filter-options="['id', 'name']"
|
:filter-options="['id', 'name']"
|
||||||
:tooltip="t('Create a new expense')"
|
:tooltip="t('Create a new expense')"
|
||||||
|
:hide-selected="false"
|
||||||
|
:display-value="formatOpt(row, col, 'name')"
|
||||||
|
@keydown.tab="
|
||||||
|
row[col.model] = useAccountShortToStandard(
|
||||||
|
$event.target.value
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
Loading…
Reference in New Issue
Sacado de Salix