#7936 improve InvoiceIn #1004

Merged
jorgep merged 55 commits from 7936-improveInvoiceIn into dev 2024-12-18 09:22:09 +00:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 482505b800 - Show all commits

View File

@ -0,0 +1,4 @@
export function useAccountShortToStandard(val) {
Review

Sacado de Salix

Sacado de Salix
if (!val || !/^\d+(\.\d*)$/.test(val)) return;
return val?.replace('.', '0'.repeat(11 - val.length));
}

View File

@ -12,6 +12,7 @@ import VnInputNumber from 'src/components/common/VnInputNumber.vue';
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
import CreateNewExpenseForm from 'src/components/CreateNewExpenseForm.vue';
import { getExchange } from 'src/composables/getExchange';
import { useAccountShortToStandard } from 'src/composables/useAccountShortToStandard';
const { t } = useI18n();
@ -172,6 +173,13 @@ const formatOpt = (row, { model, options }, prop) => {
:option-label="col.optionLabel"
:filter-options="['id', 'name']"
: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">
<QItem v-bind="scope.itemProps">