This commit is contained in:
parent
4ee0bd687f
commit
b2a8326170
|
@ -6,7 +6,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buyUltimateFromInte
|
|||
)
|
||||
BEGIN
|
||||
/**
|
||||
* DEPRECATED usar buy_getUltimateFromInterval
|
||||
* @deprecated Usar buy_getUltimateFromInterval
|
||||
* Calcula las últimas compras realizadas
|
||||
* desde un rango de fechas.
|
||||
*
|
||||
|
|
|
@ -13,7 +13,7 @@ BEGIN
|
|||
* @param vDated Compras hasta fecha
|
||||
* @return tmp.buyUltimate
|
||||
*/
|
||||
CALL cache.last_buy_refresh (FALSE);
|
||||
CALL cache.last_buy_refresh(FALSE);
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.buyUltimate;
|
||||
CREATE TEMPORARY TABLE tmp.buyUltimate
|
||||
|
|
|
@ -25,8 +25,8 @@ BEGIN
|
|||
END IF;
|
||||
|
||||
-- Item
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.buyUltimateFromInterval;
|
||||
CREATE TEMPORARY TABLE tmp.buyUltimateFromInterval
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.buyUltimateFromInterval
|
||||
(PRIMARY KEY (itemFk, warehouseFk),
|
||||
INDEX(buyFk), INDEX(landed), INDEX(warehouseFk), INDEX(itemFk))
|
||||
ENGINE = MEMORY
|
||||
|
@ -97,7 +97,8 @@ BEGIN
|
|||
LIMIT 10000000000000000000) sub
|
||||
GROUP BY itemFk, warehouseFk;
|
||||
|
||||
-- ItemOriginal
|
||||
-- ItemOriginal
|
||||
|
||||
INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored)
|
||||
SELECT itemFk,
|
||||
warehouseFk,
|
||||
|
|
Loading…
Reference in New Issue