From 6a83cec33fbc163cc7c99df0bc72e4ee21da977a Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 6 Feb 2025 17:43:58 +0100 Subject: [PATCH 1/5] fix: add await --- modules/client/back/models/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/back/models/client.js b/modules/client/back/models/client.js index dc19c5d81..967469c06 100644 --- a/modules/client/back/models/client.js +++ b/modules/client/back/models/client.js @@ -250,7 +250,7 @@ module.exports = Self => { const loopBackContext = LoopBackContext.getCurrentContext(); const accessToken = {req: loopBackContext.active.accessToken}; - const editVerifiedDataWithoutTaxDataChecked = models.ACL.checkAccessAcl( + const editVerifiedDataWithoutTaxDataChecked = await models.ACL.checkAccessAcl( accessToken, 'Client', 'editVerifiedDataWithoutTaxDataCheck', From ec01c6b0c2f08ebe4b56cfe48379eb31b2fd3e63 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 7 Feb 2025 07:51:18 +0100 Subject: [PATCH 2/5] fix: fixed company filter --- modules/invoiceOut/back/methods/invoiceOut/filter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/invoiceOut/back/methods/invoiceOut/filter.js b/modules/invoiceOut/back/methods/invoiceOut/filter.js index ab6782140..89cba2ac6 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/filter.js +++ b/modules/invoiceOut/back/methods/invoiceOut/filter.js @@ -31,6 +31,11 @@ module.exports = Self => { type: 'integer', description: 'The client id', http: {source: 'query'} + }, { + arg: 'companyFk', + type: 'integer', + description: 'The company id', + http: {source: 'query'} }, { arg: 'fi', @@ -148,6 +153,7 @@ module.exports = Self => { i.hasPdf, i.customsAgentFk, c.socialName AS clientSocialName, + i.companyFk, co.code AS companyCode, ca.fiscalName AS customsAgentName FROM invoiceOut i From 200f159c6b41f2de51519a20ef3173d0bcff9b16 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 7 Feb 2025 07:55:08 +0100 Subject: [PATCH 3/5] fix: style --- modules/invoiceOut/back/methods/invoiceOut/filter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/filter.js b/modules/invoiceOut/back/methods/invoiceOut/filter.js index 89cba2ac6..9d1864676 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/filter.js +++ b/modules/invoiceOut/back/methods/invoiceOut/filter.js @@ -31,7 +31,8 @@ module.exports = Self => { type: 'integer', description: 'The client id', http: {source: 'query'} - }, { + }, + { arg: 'companyFk', type: 'integer', description: 'The company id', From 23134deab5d57a14ed9248640510f80c739052c6 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 7 Feb 2025 11:11:22 +0100 Subject: [PATCH 4/5] fix: before save checkAccessAcl --- 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 967469c06..477431e21 100644 --- a/modules/client/back/models/client.js +++ b/modules/client/back/models/client.js @@ -248,7 +248,8 @@ module.exports = Self => { const models = Self.app.models; const loopBackContext = LoopBackContext.getCurrentContext(); - const accessToken = {req: loopBackContext.active.accessToken}; + + const accessToken = {req: {accessToken: loopBackContext.active.accessToken}}; const editVerifiedDataWithoutTaxDataChecked = await models.ACL.checkAccessAcl( accessToken, From 95d2823666fab9f5b897a7ff3c47ae0cc765d176 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 7 Feb 2025 14:27:27 +0100 Subject: [PATCH 5/5] fix: refs #7024 Deleted dated check --- db/routines/vn/triggers/entry_beforeUpdate.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/routines/vn/triggers/entry_beforeUpdate.sql b/db/routines/vn/triggers/entry_beforeUpdate.sql index 4f2c5ed4a..a375fc2af 100644 --- a/db/routines/vn/triggers/entry_beforeUpdate.sql +++ b/db/routines/vn/triggers/entry_beforeUpdate.sql @@ -10,7 +10,6 @@ BEGIN IF NEW.isBooked = OLD.isBooked AND ( NOT (NEW.supplierFk <=> OLD.supplierFk) OR - NOT (NEW.dated <=> OLD.dated) OR NOT (NEW.travelFk <=> OLD.travelFk) OR NOT (NEW.companyFk <=> OLD.companyFk) OR NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR