From 6f0038e4cc263add05b6c513f382ab3fc438551e Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 23 Apr 2024 10:23:21 +0200 Subject: [PATCH 1/4] fix: refs #7226 disable debug --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bfe31fc60..9d5954f86 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ node { FROM_GIT = env.JOB_NAME.startsWith('gitea/') RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT RUN_BUILD = PROTECTED_BRANCH && FROM_GIT - env.DEBUG = 'strong-remoting:shared-method' + // env.DEBUG = 'strong-remoting:shared-method' // https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables echo "NODE_NAME: ${env.NODE_NAME}" echo "WORKSPACE: ${env.WORKSPACE}" From 8dd4ac91199916ac5c45f94f600087974a65338c Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 23 Apr 2024 11:50:48 +0200 Subject: [PATCH 2/4] hotfix: Throw msg and entry_updateComission start transaction --- db/routines/vn/procedures/buy_chekItem.sql | 6 +++--- db/routines/vn/procedures/entry_updateComission.sql | 13 ++++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/db/routines/vn/procedures/buy_chekItem.sql b/db/routines/vn/procedures/buy_chekItem.sql index 0a0f00345..e8cf05fed 100644 --- a/db/routines/vn/procedures/buy_chekItem.sql +++ b/db/routines/vn/procedures/buy_chekItem.sql @@ -19,10 +19,10 @@ BEGIN AND a.hasWeightVolumetric LIMIT 1; - DROP TEMPORARY TABLE IF EXISTS tmp.buysToCheck; + DROP TEMPORARY TABLE tmp.buysToCheck; - IF hasVolumetricAgency THEN - CALL util.throw('Some purchase line has an item without size or weight per stem in the volumetric agency.'); + IF hasVolumetricAgency THEN + CALL util.throw('Item lacks size/weight in purchase line at agency'); END IF; END$$ DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/procedures/entry_updateComission.sql b/db/routines/vn/procedures/entry_updateComission.sql index 1bef79bd3..ceed20d78 100644 --- a/db/routines/vn/procedures/entry_updateComission.sql +++ b/db/routines/vn/procedures/entry_updateComission.sql @@ -9,6 +9,14 @@ BEGIN DECLARE vCurrencyName VARCHAR(25); DECLARE vComission INT; + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + ROLLBACK; + RESIGNAL; + END; + + START TRANSACTION; + CREATE OR REPLACE TEMPORARY TABLE tmp.recalcEntryCommision SELECT e.id FROM vn.entry e @@ -28,12 +36,15 @@ BEGIN WHERE id = vCurrency; CALL entry_recalc(); + + COMMIT; + SELECT util.notification_send( 'entry-update-comission', JSON_OBJECT('currencyName', vCurrencyName, 'referenceCurrent', vComission), NULL ); - DROP TEMPORARY TABLE tmp.recalcEntryCommision; + DROP TEMPORARY TABLE tmp.recalcEntryCommision; END$$ DELIMITER ; From ec23cc7619ff59c1a4c981c1831ffdaef15d2708 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 23 Apr 2024 14:41:43 +0200 Subject: [PATCH 3/4] hotfix: entry_checkBooked --- db/routines/vn/procedures/entry_checkBooked.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/entry_checkBooked.sql b/db/routines/vn/procedures/entry_checkBooked.sql index 3ca8c9642..7ee1fee22 100644 --- a/db/routines/vn/procedures/entry_checkBooked.sql +++ b/db/routines/vn/procedures/entry_checkBooked.sql @@ -15,7 +15,7 @@ BEGIN FROM `entry` WHERE id = vSelf; - IF vIsBooked AND NOT @isModeInventory THEN + IF vIsBooked AND NOT IFNULL(@isModeInventory, FALSE) THEN CALL util.throw('Entry is already booked'); END IF; END$$ From 033bcf6b679f272d4dbe4232f03d7bbb2f083d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Tue, 23 Apr 2024 17:24:47 +0200 Subject: [PATCH 4/4] hotfix importErrorNotification refs #6189 --- db/routines/sage/procedures/importErrorNotification.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/sage/procedures/importErrorNotification.sql b/db/routines/sage/procedures/importErrorNotification.sql index b070097f4..75b0cffc8 100644 --- a/db/routines/sage/procedures/importErrorNotification.sql +++ b/db/routines/sage/procedures/importErrorNotification.sql @@ -43,7 +43,7 @@ BEGIN WHERE sub.amountTaxableBase<>sub2.amountTaxableBase AND sub.amountTaxableBase/2 <> sub2.amountTaxableBase UNION ALL - SELECT CONCAT('- Factura Duplicada: ', mc.Asiento) + SELECT CONCAT('- Factura Duplicada: ', accountingEntryFk) FROM accountingEntryError )sub;