2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`(
|
2024-05-09 09:33:57 +00:00
|
|
|
vEntryFk INT(11)
|
|
|
|
)
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
/**
|
|
|
|
* Recalcula los precios de una entrada
|
|
|
|
*
|
|
|
|
* @param vEntryFk
|
2024-05-09 09:33:57 +00:00
|
|
|
*/
|
2024-01-15 11:31:03 +00:00
|
|
|
DROP TEMPORARY TABLE IF EXISTS tmp.buyRecalc;
|
|
|
|
|
|
|
|
CREATE TEMPORARY TABLE tmp.buyRecalc
|
|
|
|
SELECT b.id
|
|
|
|
FROM buy b
|
|
|
|
WHERE b.entryFk = vEntryFk;
|
|
|
|
|
|
|
|
CALL buy_recalcPrices();
|
|
|
|
|
|
|
|
DROP TEMPORARY TABLE tmp.buyRecalc;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|