fix: autocompletar el switf/bic
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
d836874b7c
commit
497d756af6
|
@ -13,14 +13,20 @@ export default class Controller extends Section {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get ibanCountry() {
|
||||||
|
if (!this.worker || !this.worker.iban) return false;
|
||||||
|
|
||||||
|
let countryCode = this.worker.iban.substr(0, 2);
|
||||||
|
|
||||||
|
return countryCode;
|
||||||
|
}
|
||||||
|
|
||||||
autofillBic() {
|
autofillBic() {
|
||||||
if (!this.worker || !this.worker.iban) return;
|
if (!this.worker || !this.worker.iban) return;
|
||||||
|
|
||||||
let bankEntityId = parseInt(this.worker.iban.substr(4, 4));
|
let bankEntityId = parseInt(this.worker.iban.substr(4, 4));
|
||||||
let filter = {where: {id: bankEntityId}};
|
let filter = {where: {id: bankEntityId}};
|
||||||
|
|
||||||
if (this.ibanCountry != 'ES') return;
|
|
||||||
|
|
||||||
this.$http.get(`BankEntities`, {filter}).then(response => {
|
this.$http.get(`BankEntities`, {filter}).then(response => {
|
||||||
const hasData = response.data && response.data[0];
|
const hasData = response.data && response.data[0];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue