From e96fa75356caf77cbd95c9c0fa27278bc10b2f38 Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 18 Jul 2024 09:22:27 +0200 Subject: [PATCH 1/4] fix: refs #7039 country order --- modules/invoiceIn/front/intrastat/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/invoiceIn/front/intrastat/index.html b/modules/invoiceIn/front/intrastat/index.html index fc0139303..b15fdf543 100644 --- a/modules/invoiceIn/front/intrastat/index.html +++ b/modules/invoiceIn/front/intrastat/index.html @@ -10,7 +10,7 @@ auto-load="true" url="Countries" data="countries" - order="country"> + order="name"> Date: Thu, 18 Jul 2024 10:13:21 +0200 Subject: [PATCH 2/4] feat: refs #6403 add address mobile --- back/methods/mrw-config/createShipment.ejs | 2 +- back/methods/mrw-config/createShipment.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/back/methods/mrw-config/createShipment.ejs b/back/methods/mrw-config/createShipment.ejs index 65326112b..52ccc859c 100644 --- a/back/methods/mrw-config/createShipment.ejs +++ b/back/methods/mrw-config/createShipment.ejs @@ -25,7 +25,7 @@ <%= expeditionData.fi %> <%= expeditionData.clientName %> - <%= expeditionData.phone %> + <%= expeditionData.mobile %> <%= expeditionData.deliveryObservation %> diff --git a/back/methods/mrw-config/createShipment.js b/back/methods/mrw-config/createShipment.js index 900e1fc0f..4db0d0c7d 100644 --- a/back/methods/mrw-config/createShipment.js +++ b/back/methods/mrw-config/createShipment.js @@ -47,7 +47,7 @@ module.exports = Self => { co.code countryCode, c.fi, c.name clientName, - c.phone, + a.mobile, DATE_FORMAT(t.shipped, '%d/%m/%Y') created, t.shipped, CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference, From bd1074131109cf8439a345d300794b098677dd38 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 18 Jul 2024 12:42:00 +0200 Subject: [PATCH 3/4] hotFix reservas refs #6861 --- .../vn/procedures/itemShelvingSale_reallocate.sql | 13 ++++++++----- .../vn/procedures/itemShelvingSale_setQuantity.sql | 13 +++++++++---- db/versions/11159-redIvy/00-firstScript.sql | 3 +++ 3 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 db/versions/11159-redIvy/00-firstScript.sql diff --git a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql index 2b9f927e4..a60287caa 100644 --- a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql +++ b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql @@ -20,17 +20,20 @@ BEGIN START TRANSACTION; - SELECT id INTO vItemShelvingFk - FROM itemShelving - WHERE id = vItemShelvingFk - FOR UPDATE; - UPDATE itemShelving SET visible = 0, available = 0 WHERE id = vItemShelvingFk AND itemFk = vItemFk; + SELECT iss.id + FROM itemShelvingSale iss + JOIN itemShelving ish ON ish.id = iss.itemShelvingFk + WHERE iss.itemShelvingFk = vItemShelvingFk + AND iss.itemFk = vItemFk + AND NOT iss.isPicked + FOR UPDATE; + INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk) SELECT DISTINCT iss.saleFk FROM itemShelvingSale iss diff --git a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql index b65c5df7f..30abefec8 100644 --- a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql +++ b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql @@ -31,6 +31,12 @@ BEGIN RESIGNAL; END; + IF vQuantity > vReservedQuantity + OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty) + OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN + CALL util.throw('The quantity cannot be different from the reserved'); + END IF; + IF (SELECT isPicked FROM itemShelvingSale WHERE id = vItemShelvingSaleFk) THEN CALL util.throw('Reservation completed'); END IF; @@ -52,9 +58,8 @@ BEGIN AND NOT iss.isPicked; IF vQuantity > vReservedQuantity - OR (vQuantity < vReservedQuantity AND - (NOT vIsItemShelvingSaleEmpty OR vIsItemShelvingSaleEmpty IS NULL)) - OR (vIsItemShelvingSaleEmpty IS NOT NULL AND vQuantity = vReservedQuantity) THEN + OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty) + OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN CALL util.throw('The quantity cannot be different from the reserved'); END IF; @@ -99,7 +104,7 @@ BEGIN IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN INSERT INTO itemShelvingSaleReserve (saleFk, vSectorFk) - SELECT vSaleFk; + SELECT vSaleFk, vSectorFk; CALL itemShelvingSale_reallocate(vItemShelvingFk, vItemFk, vSectorFk); END IF; END$$ diff --git a/db/versions/11159-redIvy/00-firstScript.sql b/db/versions/11159-redIvy/00-firstScript.sql new file mode 100644 index 000000000..d0b563b7a --- /dev/null +++ b/db/versions/11159-redIvy/00-firstScript.sql @@ -0,0 +1,3 @@ + + +ALTER TABLE vn.itemShelvingSale MODIFY COLUMN IF EXISTS isPicked tinyint(1) DEFAULT 1 NOT NULL; From ba5c44994d19103206d284d0900858f9dd661e6c Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 18 Jul 2024 13:45:06 +0200 Subject: [PATCH 4/4] feat: refs #7686 Added cascade on update vn.state.alertLevel --- db/versions/11160-blueRoebelini/00-firstScript.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 db/versions/11160-blueRoebelini/00-firstScript.sql diff --git a/db/versions/11160-blueRoebelini/00-firstScript.sql b/db/versions/11160-blueRoebelini/00-firstScript.sql new file mode 100644 index 000000000..235eda7fd --- /dev/null +++ b/db/versions/11160-blueRoebelini/00-firstScript.sql @@ -0,0 +1,2 @@ +ALTER TABLE vn.state DROP FOREIGN KEY state_ibfk_1; +ALTER TABLE vn.state ADD CONSTRAINT state_ibfk_1 FOREIGN KEY (alertLevel) REFERENCES vn.alertLevel(id) ON DELETE RESTRICT ON UPDATE CASCADE;