From b48c221028cd1580c4528bbed95f73a3bba9843c Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 19 Sep 2024 08:33:33 +0200 Subject: [PATCH 1/5] feat: refs #8000 refs #800 catalog_calculate itemMaxLength --- db/routines/vn/procedures/catalog_calculate.sql | 5 ++++- db/versions/11248-azureOrchid/00-firstScript.sql | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 db/versions/11248-azureOrchid/00-firstScript.sql diff --git a/db/routines/vn/procedures/catalog_calculate.sql b/db/routines/vn/procedures/catalog_calculate.sql index 17e7450cc..39bf2b441 100644 --- a/db/routines/vn/procedures/catalog_calculate.sql +++ b/db/routines/vn/procedures/catalog_calculate.sql @@ -126,7 +126,10 @@ BEGIN AND a.available > 0 AND (sub.itemAllowed OR NOT it.isFloramondo OR anr.available > 0) AND (ag.isAnyVolumeAllowed OR NOT itt.isUnconventionalSize) - AND (itc.isReclining OR it.`size` IS NULL OR it.`size` < z.itemMaxSize OR z.itemMaxSize IS NULL) + AND (it.`size` IS NULL + OR IF(itc.isReclining, + it.size <= z.itemMaxLength OR z.itemMaxLength IS NULL, + it.size <= z.itemMaxSize OR z.itemMaxSize IS NULL)) AND cit.id IS NULL AND zit.id IS NULL AND ait.id IS NULL; diff --git a/db/versions/11248-azureOrchid/00-firstScript.sql b/db/versions/11248-azureOrchid/00-firstScript.sql new file mode 100644 index 000000000..24b4259bc --- /dev/null +++ b/db/versions/11248-azureOrchid/00-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.`zone` + ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL; \ No newline at end of file From 5456490dcd9278b3047593bd85558bab3e66a3a9 Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 19 Sep 2024 12:09:47 +0200 Subject: [PATCH 2/5] feat: refs #8000 poner comentario --- db/versions/11248-azureOrchid/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11248-azureOrchid/00-firstScript.sql b/db/versions/11248-azureOrchid/00-firstScript.sql index 24b4259bc..72eafeba1 100644 --- a/db/versions/11248-azureOrchid/00-firstScript.sql +++ b/db/versions/11248-azureOrchid/00-firstScript.sql @@ -1,2 +1,2 @@ ALTER TABLE vn.`zone` - ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL; \ No newline at end of file + ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos inclinados'; \ No newline at end of file From 0c35e1fa9c6c87cb0c96169fe3aff2485261e360 Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 20 Sep 2024 07:33:05 +0200 Subject: [PATCH 3/5] feat: refs #8000 modificar comentario --- db/versions/11248-azureOrchid/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11248-azureOrchid/00-firstScript.sql b/db/versions/11248-azureOrchid/00-firstScript.sql index 72eafeba1..85386c4d8 100644 --- a/db/versions/11248-azureOrchid/00-firstScript.sql +++ b/db/versions/11248-azureOrchid/00-firstScript.sql @@ -1,2 +1,2 @@ ALTER TABLE vn.`zone` - ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos inclinados'; \ No newline at end of file + ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos reclinados'; \ No newline at end of file From 1b4a324c3c7861f753ecba5a206d506a32caf4fc Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 20 Sep 2024 07:58:15 +0200 Subject: [PATCH 4/5] feat: refs #8000 modificar comentarios --- db/versions/11248-azureOrchid/00-firstScript.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/versions/11248-azureOrchid/00-firstScript.sql b/db/versions/11248-azureOrchid/00-firstScript.sql index 85386c4d8..b13a726a8 100644 --- a/db/versions/11248-azureOrchid/00-firstScript.sql +++ b/db/versions/11248-azureOrchid/00-firstScript.sql @@ -1,2 +1,3 @@ -ALTER TABLE vn.`zone` - ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos reclinados'; \ No newline at end of file +ALTER TABLE vn.`zone` + ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos reclinados que esa agencia puede transportar', + MODIFY COLUMN itemMaxSize int(11) DEFAULT NULL NULL COMMENT 'Altura maxima de los articulos que esa agencia puede transportar'; From a65700abed81fff506d0dfa00d33d9bcadc2be8c Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 20 Sep 2024 10:37:36 +0200 Subject: [PATCH 5/5] feat: refs #8000 modificar comentario --- db/versions/11248-azureOrchid/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11248-azureOrchid/00-firstScript.sql b/db/versions/11248-azureOrchid/00-firstScript.sql index b13a726a8..a4a4bd740 100644 --- a/db/versions/11248-azureOrchid/00-firstScript.sql +++ b/db/versions/11248-azureOrchid/00-firstScript.sql @@ -1,3 +1,3 @@ ALTER TABLE vn.`zone` - ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos reclinados que esa agencia puede transportar', + ADD COLUMN IF NOT EXISTS itemMaxLength int(11) NULL COMMENT 'Longitud maxima para articulos acostados que esa agencia puede transportar', MODIFY COLUMN itemMaxSize int(11) DEFAULT NULL NULL COMMENT 'Altura maxima de los articulos que esa agencia puede transportar';