feat: previas con sitema de reservas refs #6861 #2176
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 (
|
||||
jgallego
commented
itemShelvingSaleReserv perque este nom? itemShelvingSaleReserv perque este nom?
carlosap
commented
Es una cola de les reserves que queden per fer en la taula vn.itemShelvingSale Es una cola de les reserves que queden per fer en la taula vn.itemShelvingSale
jgallego
commented
seria itemShelvingSaleReserves seria itemShelvingSaleReserves
carlosap
commented
En plural?? En plural??
jgallego
commented
itemShelvingSaleReserve el singular itemShelvingSaleReserve el singular
si vols pots gastar el allocate que he vist tb per ahí, pero que siga tot igual
|
||||
`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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue
itemShelvingSaleReserve