From 901cdc7117b1ac701447762c23f1a5846c93400d Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 6 Sep 2024 14:18:15 +0200 Subject: [PATCH 01/10] feat: refs #4074 modify acls --- .../11216-salmonPaniculata/00-firstScript.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/versions/11216-salmonPaniculata/00-firstScript.sql diff --git a/db/versions/11216-salmonPaniculata/00-firstScript.sql b/db/versions/11216-salmonPaniculata/00-firstScript.sql new file mode 100644 index 000000000..956dcc25b --- /dev/null +++ b/db/versions/11216-salmonPaniculata/00-firstScript.sql @@ -0,0 +1,12 @@ +-- Place your SQL code here +DELETE FROM salix.ACL WHERE model = 'Province' LIMIT 1; +DELETE FROM salix.ACL WHERE model = 'Town' LIMIT 1; + +UPDATE salix.ACL SET accessType = 'READ' WHERE model = 'BankEntity'; +INSERT INTO salix.ACL + SET model = 'BankEntity', + property = '*', + accessType = 'WRITE', + permission = 'ALLOW', + principalType = 'ROLE', + principalId = 'financial'; From 88a8b4975bd9118f1c7a306b964a69f7c731ef5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 9 Sep 2024 12:37:49 +0200 Subject: [PATCH 02/10] fix: ticket 218504 ticket_close --- db/routines/vn/procedures/ticket_close.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index f8bbe239b..639b6b505 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -85,7 +85,7 @@ BEGIN IF(vHasDailyInvoice) AND vHasToInvoice THEN SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial; - IF NOT vSerial THEN + IF vSerial IS NULL THEN CALL util.throw('Cannot booking without a serial'); END IF; From d9a4b3e6fb7b689a644499ca205b3e3c54c57226 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 9 Sep 2024 12:42:19 +0200 Subject: [PATCH 03/10] fix: refs #7346 Global invoice --- modules/invoiceOut/front/global-invoicing/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js index 9a936611a..b9a5ffe91 100644 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ b/modules/invoiceOut/front/global-invoicing/index.js @@ -105,7 +105,8 @@ class Controller extends Section { addressId: address.id, invoiceDate: this.invoiceDate, maxShipped: this.maxShipped, - companyFk: this.companyFk + companyFk: this.companyFk, + serialType: 'quick' }; this.$http.post(`InvoiceOuts/invoiceClient`, params) From 52f368e4f7d96d91598ec0917f796915d86336c7 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 9 Sep 2024 14:25:13 +0200 Subject: [PATCH 04/10] fix: refs #7346 Global invoice --- modules/invoiceOut/front/global-invoicing/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js index b9a5ffe91..5ea8c2c28 100644 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ b/modules/invoiceOut/front/global-invoicing/index.js @@ -106,7 +106,7 @@ class Controller extends Section { invoiceDate: this.invoiceDate, maxShipped: this.maxShipped, companyFk: this.companyFk, - serialType: 'quick' + serialType: 'global' }; this.$http.post(`InvoiceOuts/invoiceClient`, params) From 45649359be0b2c788d93f1847a9c9b18159cad1d Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 9 Sep 2024 15:59:17 +0200 Subject: [PATCH 05/10] chore: refs #4074 fix test --- .../02-client/04_edit_billing_data.spec.js | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/e2e/paths/02-client/04_edit_billing_data.spec.js b/e2e/paths/02-client/04_edit_billing_data.spec.js index 10eb85406..12a2e7b74 100644 --- a/e2e/paths/02-client/04_edit_billing_data.spec.js +++ b/e2e/paths/02-client/04_edit_billing_data.spec.js @@ -18,7 +18,7 @@ const $ = { watcher: 'vn-client-billing-data vn-watcher' }; -describe('Client Edit billing data path', () => { +fdescribe('Client Edit billing data path', () => { let browser; let page; beforeAll(async() => { @@ -35,6 +35,14 @@ describe('Client Edit billing data path', () => { it(`should attempt to edit the billing data without an IBAN but fail`, async() => { await page.autocompleteSearch($.payMethod, 'PayMethod with IBAN'); + await page.waitToClick($.saveButton); + const message = await page.waitForSnackbar(); + + expect(message.text).toContain('That payment method requires an IBAN'); + }); + + it(`should edit the billing data and save the form`, async() => { + await page.autocompleteSearch($.payMethod, 'PayMethod five'); await page.autocompleteSearch($.swiftBic, 'BBKKESMMMMM'); await page.clearInput($.dueDay); await page.write($.dueDay, '60'); @@ -45,10 +53,13 @@ describe('Client Edit billing data path', () => { await page.waitToClick($.saveButton); const message = await page.waitForSnackbar(); - expect(message.text).toContain('That payment method requires an IBAN'); + expect(message.text).toContain('Notification sent!'); }); it(`should create a new BIC code`, async() => { + await page.loginAndModule('financial', 'client'); + await page.accessToSearchResult('Bruce Banner'); + await page.accessToSection('client.card.billingData'); await page.waitToClick($.newBankEntityButton); await page.write($.newBankEntityName, 'Gotham City Bank'); await page.write($.newBankEntityBIC, 'GTHMCT'); @@ -66,7 +77,7 @@ describe('Client Edit billing data path', () => { it(`should confirm the IBAN pay method was sucessfully saved`, async() => { const payMethod = await page.waitToGetProperty($.payMethod, 'value'); - expect(payMethod).toEqual('PayMethod with IBAN'); + expect(payMethod).toEqual('PayMethod five'); }); it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => { @@ -79,14 +90,6 @@ describe('Client Edit billing data path', () => { expect(automaticCode).toEqual('CAIXESBB'); }); - it(`should save the form with all its new data`, async() => { - await page.waitForWatcherData($.watcher); - await page.waitToClick($.saveButton); - const message = await page.waitForSnackbar(); - - expect(message.text).toContain('Notification sent!'); - }); - it('should confirm the billing data have been edited', async() => { const dueDate = await page.waitToGetProperty($.dueDay, 'value'); const IBAN = await page.waitToGetProperty($.IBAN, 'value'); @@ -94,7 +97,9 @@ describe('Client Edit billing data path', () => { const receivedCoreLCR = await page.checkboxState($.receivedCoreLCRCheckbox); const receivedCoreVNL = await page.checkboxState($.receivedCoreVNLCheckbox); const receivedB2BVNL = await page.checkboxState($.receivedB2BVNLCheckbox); + const payMethod = await page.waitToGetProperty($.payMethod, 'value'); + expect(payMethod).toEqual('PayMethod five'); expect(dueDate).toEqual('60'); expect(IBAN).toEqual('ES9121000418450200051332'); expect(swiftBic).toEqual('CAIXESBB'); From eadff638f90d9472f96c4a0dc061457b85cb6e86 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 9 Sep 2024 15:59:40 +0200 Subject: [PATCH 06/10] chore: refs #4074 drop focus --- e2e/paths/02-client/04_edit_billing_data.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/paths/02-client/04_edit_billing_data.spec.js b/e2e/paths/02-client/04_edit_billing_data.spec.js index 12a2e7b74..ca2c3b953 100644 --- a/e2e/paths/02-client/04_edit_billing_data.spec.js +++ b/e2e/paths/02-client/04_edit_billing_data.spec.js @@ -18,7 +18,7 @@ const $ = { watcher: 'vn-client-billing-data vn-watcher' }; -fdescribe('Client Edit billing data path', () => { +describe('Client Edit billing data path', () => { let browser; let page; beforeAll(async() => { From e74da7cbaba7cf08c025fe08b4cc79f2c236a9b4 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 10 Sep 2024 08:17:47 +0200 Subject: [PATCH 07/10] feat: refs #7953 pullinfo --- db/.pullinfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/.pullinfo.json b/db/.pullinfo.json index 27d2c7535..5b75584d1 100644 --- a/db/.pullinfo.json +++ b/db/.pullinfo.json @@ -9,7 +9,7 @@ }, "vn": { "view": { - "expeditionPallet_Print": "ced2b84a114fcb99fce05f0c34f4fc03f3fa387bef92621be1bc306608a84345" + "expeditionPallet_Print": "99f75145ac2e7b612a6d71e74b6e55f194a465780fd9875a15eb01e6596b447e" } } } From 1c0e148233f066993713b92355fc4b00fc52c7f0 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 10 Sep 2024 09:08:43 +0200 Subject: [PATCH 08/10] fix: cau #217599 --- modules/client/back/models/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/client/back/models/client.js b/modules/client/back/models/client.js index 0a8ebcae5..dc19c5d81 100644 --- a/modules/client/back/models/client.js +++ b/modules/client/back/models/client.js @@ -320,7 +320,8 @@ module.exports = Self => { // Credit management changes - if (changes?.rating >= 0 || changes?.recommendedCredit >= 0) + if ((changes?.rating != null && changes.rating >= 0) + || (changes?.recommendedCredit != null && changes.recommendedCredit >= 0)) await Self.changeCreditManagement(ctx, finalState, changes); const oldInstance = {}; From bb27f0f1f531b958f49910b83a3559d60022c82b Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 10 Sep 2024 10:34:28 +0200 Subject: [PATCH 09/10] build: init version 2440 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bbb83c4b0..1d3b9d253 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "24.36.0", + "version": "24.40.0", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From 01d591af53d5b00eed6e35f3537f9eb423df318f Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 10 Sep 2024 12:58:16 +0200 Subject: [PATCH 10/10] fix: refs #7564 Deleted query --- db/versions/11124-greenBamboo/01-firstScript.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/versions/11124-greenBamboo/01-firstScript.sql b/db/versions/11124-greenBamboo/01-firstScript.sql index 9cacbd5ff..af3a40f14 100644 --- a/db/versions/11124-greenBamboo/01-firstScript.sql +++ b/db/versions/11124-greenBamboo/01-firstScript.sql @@ -1,4 +1,5 @@ -- Calculamos todos los volumenes de todos los tickets una sola vez +/* Se ejecutará el dia de test - master manualmente para no hacer lenta la subida CREATE OR REPLACE TEMPORARY TABLE tmp.tTicketVolume (PRIMARY KEY (id)) ENGINE = MEMORY @@ -14,3 +15,4 @@ UPDATE vn.ticket t SET t.volume = tv.volume; DROP TEMPORARY TABLE tmp.tTicketVolume; +*/