Merge pull request 'fix: autocompletar el switf/bic' (!1388) from 5352-worker.create_swift/bic into dev
gitea/salix/pipeline/head Build queued...
Details
gitea/salix/pipeline/head Build queued...
Details
Reviewed-on: #1388 Reviewed-by: Javi Gallego <jgallego@verdnatura.es> Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
d9296c139d
|
@ -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