From 3f9a6ca3fe75f243eaa43f24ea1cb4ab1400aa3b Mon Sep 17 00:00:00 2001 From: ivanm Date: Wed, 31 Jan 2024 12:42:03 +0100 Subject: [PATCH] refs #6757 return original triggers and fix test --- db/routines/vn/triggers/supplier_beforeInsert.sql | 2 -- db/routines/vn/triggers/supplier_beforeUpdate.sql | 3 --- modules/entry/back/methods/entry/specs/getEntry.spec.js | 2 +- modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js | 2 +- .../supplier/back/methods/supplier/specs/getSummary.spec.js | 2 +- .../back/methods/supplier/specs/updateFiscalData.spec.js | 2 +- 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/db/routines/vn/triggers/supplier_beforeInsert.sql b/db/routines/vn/triggers/supplier_beforeInsert.sql index 0e16e2e0a4..aef8d02abf 100644 --- a/db/routines/vn/triggers/supplier_beforeInsert.sql +++ b/db/routines/vn/triggers/supplier_beforeInsert.sql @@ -4,7 +4,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`supplier_beforeInsert FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); - SET NEW.name = UPPER(NEW.name); - SET NEW.nickname = UPPER(NEW.nickname); END$$ DELIMITER ; diff --git a/db/routines/vn/triggers/supplier_beforeUpdate.sql b/db/routines/vn/triggers/supplier_beforeUpdate.sql index 5fd879b204..f462d6f570 100644 --- a/db/routines/vn/triggers/supplier_beforeUpdate.sql +++ b/db/routines/vn/triggers/supplier_beforeUpdate.sql @@ -10,9 +10,6 @@ BEGIN DECLARE vOldPayMethodName VARCHAR(20); DECLARE vNewPayMethodName VARCHAR(20); - SET NEW.name = UPPER(NEW.name); - SET NEW.nickname = UPPER(NEW.nickname); - SET NEW.editorFk = account.myUser_getId(); SELECT hasVerified INTO vPayMethodHasVerified diff --git a/modules/entry/back/methods/entry/specs/getEntry.spec.js b/modules/entry/back/methods/entry/specs/getEntry.spec.js index 5769eb9b50..bf96015c59 100644 --- a/modules/entry/back/methods/entry/specs/getEntry.spec.js +++ b/modules/entry/back/methods/entry/specs/getEntry.spec.js @@ -26,7 +26,7 @@ describe('travel getEntry()', () => { const entry = await models.Entry.getEntry(entryId, options); const supplierName = entry.supplier().nickname; - expect(supplierName).toEqual('PLANTS NICK'); + expect(supplierName).toEqual('Plants nick'); await tx.rollback(); } catch (e) { diff --git a/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js b/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js index 5b9d0bb346..76f17720fe 100644 --- a/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js +++ b/modules/invoiceIn/back/methods/invoice-in/specs/filter.spec.js @@ -15,7 +15,7 @@ describe('InvoiceIn filter()', () => { const result = await models.InvoiceIn.filter(ctx, {}, options); expect(result.length).toEqual(5); - expect(result[0].supplierName).toEqual('PLANTS SL'); + expect(result[0].supplierName).toEqual('Plants SL'); await tx.rollback(); } catch (e) { diff --git a/modules/supplier/back/methods/supplier/specs/getSummary.spec.js b/modules/supplier/back/methods/supplier/specs/getSummary.spec.js index 3478515618..30713f5177 100644 --- a/modules/supplier/back/methods/supplier/specs/getSummary.spec.js +++ b/modules/supplier/back/methods/supplier/specs/getSummary.spec.js @@ -5,7 +5,7 @@ describe('Supplier getSummary()', () => { const supplier = await app.models.Supplier.getSummary(1); expect(supplier.id).toEqual(1); - expect(supplier.name).toEqual('PLANTS SL'); + expect(supplier.name).toEqual('Plants SL'); expect(supplier.nif).toEqual('06089160W'); expect(supplier.account).toEqual('4100000001'); expect(supplier.payDay).toEqual(15); diff --git a/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js b/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js index 704304a42f..a47e547d19 100644 --- a/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js +++ b/modules/supplier/back/methods/supplier/specs/updateFiscalData.spec.js @@ -6,7 +6,7 @@ describe('Supplier updateFiscalData', () => { const administrativeId = 5; const employeeId = 1; const defaultData = { - name: 'PLANTS SL', + name: 'Plants SL', nif: '06089160W', account: '4100000001', sageTaxTypeFk: 4,