2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-05-09 09:33:57 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByBuy`(
|
|
|
|
vBuyFk INT(11)
|
|
|
|
)
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
/**
|
|
|
|
* Recalcula los precios de una compra
|
|
|
|
*
|
|
|
|
* @param vBuyFk
|
2024-05-09 09:33:57 +00:00
|
|
|
*/
|
2024-01-15 11:31:03 +00:00
|
|
|
DROP TEMPORARY TABLE IF EXISTS tmp.buyRecalc;
|
|
|
|
|
2024-05-09 12:24:20 +00:00
|
|
|
CREATE TEMPORARY TABLE tmp.buyRecalc
|
2024-01-15 11:31:03 +00:00
|
|
|
SELECT vBuyFk id;
|
|
|
|
|
|
|
|
CALL buy_recalcPrices();
|
|
|
|
|
|
|
|
DROP TEMPORARY TABLE tmp.buyRecalc;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|