refactor: refs #8667 corrected function name and value
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
4ec43e326d
commit
e44b32f789
|
@ -130,10 +130,9 @@ async function onDataSaved(formData, { id }) {
|
|||
}
|
||||
}
|
||||
|
||||
async function accountShortToStandard({ target: { value } }) {
|
||||
async function getSupplierClientReferences(value) {
|
||||
if (!value) return (initialData.description = '');
|
||||
initialData.compensationAccount = value.replace('.', '0'.repeat(11 - value.length));
|
||||
const params = { bankAccount: initialData.compensationAccount };
|
||||
const params = { bankAccount: value };
|
||||
const { data } = await axios(`Clients/getClientOrSupplierReference`, { params });
|
||||
if (!data.clientId) {
|
||||
initialData.description = t('Supplier Compensation Reference', {
|
||||
|
@ -252,7 +251,7 @@ async function getAmountPaid() {
|
|||
:label="t('Compensation account')"
|
||||
clearable
|
||||
v-model="data.compensationAccount"
|
||||
@blur="accountShortToStandard"
|
||||
@blur="getSupplierClientReferences(data.compensationAccount)"
|
||||
/>
|
||||
</VnRow>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue