refs #5599 DELIMITER
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-05-12 11:15:47 +02:00
parent fd85cd2d98
commit 943e8b09c1
2 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,6 @@
REPLACE OR CREATE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT) DELIMITER $$
$$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT)
BEGIN BEGIN
/** /**
* Devuelve los tickets y la cantidad de lineas de venta que se pueden adelantar. * Devuelve los tickets y la cantidad de lineas de venta que se pueden adelantar.
@ -7,7 +9,7 @@ BEGIN
* @param vDateToAdvance Fecha a cuando se quiere adelantar. * @param vDateToAdvance Fecha a cuando se quiere adelantar.
* @param vWarehouseFk Almacén * @param vWarehouseFk Almacén
*/ */
DECLARE vDateInventory DATE; DECLARE vDateInventory DATE;
SELECT inventoried INTO vDateInventory FROM config; SELECT inventoried INTO vDateInventory FROM config;
@ -121,4 +123,5 @@ SELECT
) dest ON dest.addressFk = origin.addressFk ) dest ON dest.addressFk = origin.addressFk
WHERE origin.hasStock != 0; WHERE origin.hasStock != 0;
DROP TEMPORARY TABLE tmp.stock; DROP TEMPORARY TABLE tmp.stock;
END END$$
DELIMITER ;

View File

@ -1,4 +1,6 @@
REPLACE OR CREATE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT) DELIMITER $$
$$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT)
BEGIN BEGIN
/** /**
* Devuelve un listado de tickets susceptibles de fusionarse con otros tickets en el futuro * Devuelve un listado de tickets susceptibles de fusionarse con otros tickets en el futuro
@ -66,4 +68,5 @@ BEGIN
AND tp.ticketFk IS NULL AND tp.ticketFk IS NULL
GROUP BY sv.ticketFk GROUP BY sv.ticketFk
HAVING futureId; HAVING futureId;
END END$$
DELIMITER ;