#8667: Modified ClientPayment #1622

Merged
jsegarra merged 15 commits from 8667-FixClientNewPayment into dev 2025-03-31 08:17:36 +00:00
1 changed files with 3 additions and 4 deletions
Showing only changes of commit e44b32f789 - Show all commits

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 = '');
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>