diff --git a/modules/client/front/fiscal-data/index.html b/modules/client/front/fiscal-data/index.html index a3af78f2e..597174e8a 100644 --- a/modules/client/front/fiscal-data/index.html +++ b/modules/client/front/fiscal-data/index.html @@ -224,7 +224,3 @@ message="Found a client with this data" on-accept="$ctrl.onAcceptDuplication()"> - - diff --git a/modules/client/front/fiscal-data/index.js b/modules/client/front/fiscal-data/index.js index acad38185..1ef3053d5 100644 --- a/modules/client/front/fiscal-data/index.js +++ b/modules/client/front/fiscal-data/index.js @@ -103,80 +103,6 @@ export default class Controller extends Section { this.$.$apply(); } - - get province() { - return this._province; - } - - // Province auto complete - set province(selection) { - const oldValue = this._province; - this._province = selection; - - if (!selection || !oldValue) return; - - const country = selection.country; - - if (!this.client.countryFk) - this.client.countryFk = country.id; - } - - get town() { - return this._town; - } - - // Town auto complete - set town(selection) { - const oldValue = this._town; - this._town = selection; - - if (!selection || !oldValue) return; - - const province = selection.province; - const country = province.country; - const postcodes = selection.postcodes; - - if (!this.client.provinceFk) - this.client.provinceFk = province.id; - - if (!this.client.countryFk) - this.client.countryFk = country.id; - - if (!this.client.postcode && postcodes.length === 1) - this.client.postcode = postcodes[0].code; - } - - get postcode() { - return this._postcode; - } - - // Postcode auto complete - set postcode(selection) { - const oldValue = this._postcode; - this._postcode = selection; - - if (!selection || !oldValue) return; - - const town = selection.town; - const province = town.province; - const country = province.country; - - if (!this.client.city) - this.client.city = town.name; - - if (!this.client.provinceFk) - this.client.provinceFk = province.id; - - if (!this.client.countryFk) - this.client.countryFk = country.id; - } - - onResponse(response) { - this.client.postcode = response.code; - this.client.city = response.city; - this.client.provinceFk = response.provinceFk; - this.client.countryFk = response.countryFk; - } } ngModule.vnComponent('vnClientFiscalData', {