23 lines
425 B
SQL
23 lines
425 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPricesByEntry`(
|
|
vEntryFk INT(11)
|
|
)
|
|
BEGIN
|
|
/**
|
|
* Recalcula los precios de una entrada
|
|
*
|
|
* @param vEntryFk
|
|
*/
|
|
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 ;
|