From b3539e6c6e21528e4735d1672fd6d53ecf9cc3e4 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 23 Oct 2024 10:15:11 +0200 Subject: [PATCH] feat: refs #7731 quitar isVies --- db/routines/vn/triggers/client_afterUpdate.sql | 2 +- db/routines/vn/triggers/supplier_afterUpdate.sql | 2 +- db/routines/vn2008/views/Clientes.sql | 2 +- modules/client/back/methods/client/updateFiscalData.js | 8 ++------ modules/client/back/models/client.json | 3 --- .../back/methods/supplier/specs/updateFiscalData.spec.js | 3 --- .../supplier/back/methods/supplier/updateFiscalData.js | 6 +----- modules/supplier/back/models/supplier.json | 3 --- 8 files changed, 6 insertions(+), 23 deletions(-) diff --git a/db/routines/vn/triggers/client_afterUpdate.sql b/db/routines/vn/triggers/client_afterUpdate.sql index eb977faa3..eba9c0ccc 100644 --- a/db/routines/vn/triggers/client_afterUpdate.sql +++ b/db/routines/vn/triggers/client_afterUpdate.sql @@ -16,7 +16,7 @@ BEGIN OR NOT (NEW.socialName <=> OLD.socialName) OR NOT (NEW.street <=> OLD.street) OR NOT (NEW.accountingAccount <=> OLD.accountingAccount) - OR NOT (NEW.isVies <=> OLD.isVies) + OR NOT (NEW.viesCode <=> OLD.viesCode) OR NOT (NEW.fi <=> OLD.fi) OR NOT (NEW.postcode <=> OLD.postcode) OR NOT (NEW.city <=> OLD.city) diff --git a/db/routines/vn/triggers/supplier_afterUpdate.sql b/db/routines/vn/triggers/supplier_afterUpdate.sql index 07f31b5e0..99e09be4c 100644 --- a/db/routines/vn/triggers/supplier_afterUpdate.sql +++ b/db/routines/vn/triggers/supplier_afterUpdate.sql @@ -8,7 +8,7 @@ BEGIN OR NOT (NEW.street <=> OLD.street) OR NOT (NEW.account <=> OLD.account) OR NOT (NEW.nif <=> OLD.nif) - OR NOT (NEW.isVies <=> OLD.isVies) + OR NOT (NEW.viesCode <=> OLD.viesCode) OR NOT (NEW.provinceFk <=> OLD.provinceFk) OR NOT (NEW.countryFk <=> OLD.countryFk) OR NOT (NEW.postCode <=> OLD.postCode) diff --git a/db/routines/vn2008/views/Clientes.sql b/db/routines/vn2008/views/Clientes.sql index 9f8ef712e..c6f89b6bb 100644 --- a/db/routines/vn2008/views/Clientes.sql +++ b/db/routines/vn2008/views/Clientes.sql @@ -40,7 +40,7 @@ AS SELECT `c`.`id` AS `id_cliente`, `c`.`isCreatedAsServed` AS `isCreatedAsServed`, `c`.`hasInvoiceSimplified` AS `hasInvoiceSimplified`, `c`.`salesPersonFk` AS `Id_Trabajador`, - `c`.`isVies` AS `vies`, + `c`.`viesCode` AS `vies`, `c`.`bankEntityFk` AS `bankEntityFk`, `c`.`typeFk` AS `typeFk` FROM `vn`.`client` `c` diff --git a/modules/client/back/methods/client/updateFiscalData.js b/modules/client/back/methods/client/updateFiscalData.js index c7d577453..752adcc52 100644 --- a/modules/client/back/methods/client/updateFiscalData.js +++ b/modules/client/back/methods/client/updateFiscalData.js @@ -73,8 +73,8 @@ module.exports = Self => { type: 'boolean' }, { - arg: 'isVies', - type: 'boolean' + arg: 'viesCode', + type: 'any' }, { arg: 'isToBeMailed', @@ -103,10 +103,6 @@ module.exports = Self => { { arg: 'hasDailyInvoice', type: 'boolean' - }, - { - arg: 'viesCode', - type: 'any' } ], returns: { diff --git a/modules/client/back/models/client.json b/modules/client/back/models/client.json index 85420de22..828a54396 100644 --- a/modules/client/back/models/client.json +++ b/modules/client/back/models/client.json @@ -103,9 +103,6 @@ "quality": { "type": "number" }, - "isVies": { - "type": "boolean" - }, "isRelevant": { "type": "boolean" }, diff --git a/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js b/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js index 9246e7bb8..f1efbbbba 100644 --- a/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js +++ b/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js @@ -67,7 +67,6 @@ describe('Supplier updateFiscalData()', () => { healthRegister, undefined, undefined, - undefined, options); } catch (e) { expect(e.message).toEqual('You cannot update these fields'); @@ -93,7 +92,6 @@ describe('Supplier updateFiscalData()', () => { undefined, undefined, undefined, - undefined, options); expect(supplier.account).toEqual(account); @@ -123,7 +121,6 @@ describe('Supplier updateFiscalData()', () => { healthRegister, undefined, undefined, - undefined, options); expect(supplier.name).toEqual(name); diff --git a/modules/supplier/back/methods/supplier/updateFiscalData.js b/modules/supplier/back/methods/supplier/updateFiscalData.js index 56e5e8376..3a3f6e8d7 100644 --- a/modules/supplier/back/methods/supplier/updateFiscalData.js +++ b/modules/supplier/back/methods/supplier/updateFiscalData.js @@ -50,9 +50,6 @@ module.exports = Self => { }, { arg: 'healthRegister', type: 'any' - }, { - arg: 'isVies', - type: 'boolean' }, { arg: 'isTrucker', type: 'boolean' @@ -71,7 +68,7 @@ module.exports = Self => { } }); - Self.updateFiscalData = async(ctx, supplierId, name, nif, account, phone, sageTaxTypeFk, sageWithholdingFk, sageTransactionTypeFk, postCode, street, city, provinceFk, countryFk, supplierActivityFk, healthRegister, isVies, isTrucker, viesCode, options) => { + Self.updateFiscalData = async(ctx, supplierId, name, nif, account, phone, sageTaxTypeFk, sageWithholdingFk, sageTransactionTypeFk, postCode, street, city, provinceFk, countryFk, supplierActivityFk, healthRegister, isTrucker, viesCode, options) => { const models = Self.app.models; const {args} = ctx; const myOptions = {}; @@ -105,7 +102,6 @@ module.exports = Self => { countryFk, supplierActivityFk, healthRegister, - isVies, isTrucker, viesCode }, myOptions); diff --git a/modules/supplier/back/models/supplier.json b/modules/supplier/back/models/supplier.json index 0fb202400..ff9f08738 100644 --- a/modules/supplier/back/models/supplier.json +++ b/modules/supplier/back/models/supplier.json @@ -111,9 +111,6 @@ "healthRegister": { "type": "string" }, - "isVies": { - "type": "boolean" - }, "viesCode": { "type": "string" }