diff --git a/db/routines/vn/procedures/itemShelvingSale_doReserve.sql b/db/routines/vn/procedures/itemShelvingSale_doReserve.sql index d7bf4b181..629e303b3 100644 --- a/db/routines/vn/procedures/itemShelvingSale_doReserve.sql +++ b/db/routines/vn/procedures/itemShelvingSale_doReserve.sql @@ -2,7 +2,7 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_doReserve`() proc: BEGIN /** - * Genera reservas de la tabla itemShelvingSaleReserv + * Genera reservas de la tabla vn.itemShelvingSaleReserve */ DECLARE vDone BOOL; DECLARE vSaleFk INT; @@ -26,7 +26,7 @@ proc: BEGIN CREATE OR REPLACE TEMPORARY TABLE tSale ENGINE = MEMORY - SELECT id, saleFk FROM itemShelvingSaleReserv; + SELECT id, saleFk FROM itemShelvingSaleReserve; OPEN vSales; @@ -43,7 +43,7 @@ proc: BEGIN CLOSE vSales; - DELETE iss FROM itemShelvingSaleReserv iss JOIN tSale s ON s.id = iss.id; + DELETE iss FROM itemShelvingSaleReserve iss JOIN tSale s ON s.id = iss.id; DROP TEMPORARY TABLE tSale; diff --git a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql index ab898bdd4..85230a386 100644 --- a/db/routines/vn/procedures/itemShelvingSale_reallocate.sql +++ b/db/routines/vn/procedures/itemShelvingSale_reallocate.sql @@ -28,7 +28,7 @@ BEGIN WHERE id = vItemShelvingFk AND itemFk = vItemFk; - INSERT INTO itemShelvingSaleReserv (saleFk) + INSERT INTO itemShelvingSaleReserve (saleFk) SELECT DISTINCT iss.saleFk FROM itemShelvingSale iss JOIN itemShelving ish ON ish.id = iss.itemShelvingFk diff --git a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql index 00427039a..42f915ead 100644 --- a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql +++ b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql @@ -86,7 +86,7 @@ BEGIN COMMIT; IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN - INSERT INTO itemShelvingSaleReserv (saleFk) + INSERT INTO itemShelvingSaleReserve (saleFk) SELECT vSaleFk; CALL itemShelvingSale_reallocate(vItemShelvingFk, vItemFk); END IF; diff --git a/db/versions/10852-pinkOak/00-firstScript.sql b/db/versions/10852-pinkOak/00-firstScript.sql index 7739976e6..41b75c7e1 100644 --- a/db/versions/10852-pinkOak/00-firstScript.sql +++ b/db/versions/10852-pinkOak/00-firstScript.sql @@ -16,11 +16,11 @@ ALTER TABLE vn.itemShelving ADD available INT NULL; UPDATE vn.itemShelving SET available = visible; -CREATE TABLE vn.itemShelvingSaleReserv ( +CREATE TABLE vn.itemShelvingSaleReserve ( `id` int(11) NOT NULL AUTO_INCREMENT, `saleFk` int(11) NOT NULL, PRIMARY KEY (`id`), - KEY `itemShelvingSaleReserv_ibfk_1` (`saleFk`) + KEY `itemShelvingSaleReserve_ibfk_1` (`saleFk`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Queue of changed itemShelvingSale to reserve';