refactor: refs #8667 corrected function name and value
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2025-03-26 14:27:37 +01:00
parent 4ec43e326d
commit e44b32f789
1 changed files with 3 additions and 4 deletions

View File

@ -130,10 +130,9 @@ async function onDataSaved(formData, { id }) {
} }
} }
async function accountShortToStandard({ target: { value } }) { async function getSupplierClientReferences(value) {
if (!value) return (initialData.description = ''); if (!value) return (initialData.description = '');
initialData.compensationAccount = value.replace('.', '0'.repeat(11 - value.length)); const params = { bankAccount: value };
const params = { bankAccount: initialData.compensationAccount };
const { data } = await axios(`Clients/getClientOrSupplierReference`, { params }); const { data } = await axios(`Clients/getClientOrSupplierReference`, { params });
if (!data.clientId) { if (!data.clientId) {
initialData.description = t('Supplier Compensation Reference', { initialData.description = t('Supplier Compensation Reference', {
@ -252,7 +251,7 @@ async function getAmountPaid() {
:label="t('Compensation account')" :label="t('Compensation account')"
clearable clearable
v-model="data.compensationAccount" v-model="data.compensationAccount"
@blur="accountShortToStandard" @blur="getSupplierClientReferences(data.compensationAccount)"
/> />
</VnRow> </VnRow>
</div> </div>