Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
b4377e36e2
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getAtp`(vDated DATE)
|
||||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getAtp`(vDated DATE)
|
||||
BEGIN
|
||||
/**
|
||||
* Calcula el valor mínimo acumulado para cada artículo ordenado por fecha y
|
||||
|
@ -44,5 +44,5 @@ BEGIN
|
|||
GROUP BY itemFk, wareHouseFk;
|
||||
|
||||
DROP TEMPORARY TABLE tItemOrdered;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -30,6 +30,7 @@ BEGIN
|
|||
FROM sale s
|
||||
JOIN ticket t ON t.id = s.ticketFk
|
||||
WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo
|
||||
AND t.warehouseFk
|
||||
AND s.quantity != 0
|
||||
AND (vItemFk IS NULL OR s.itemFk = vItemFk)
|
||||
AND (vWarehouseFk IS NULL OR t.warehouseFk = vWarehouseFk)
|
||||
|
@ -40,7 +41,7 @@ BEGIN
|
|||
t.warehouseInFk
|
||||
FROM buy b
|
||||
JOIN entry e ON e.id = b.entryFk
|
||||
LEFT JOIN travel t ON t.id = e.travelFk
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
WHERE t.landed BETWEEN vDatedFrom AND vDatedTo
|
||||
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
|
||||
AND !e.isExcludedFromAvailable
|
||||
|
@ -53,7 +54,7 @@ BEGIN
|
|||
t.warehouseOutFk
|
||||
FROM buy b
|
||||
JOIN entry e ON e.id = b.entryFk
|
||||
LEFT JOIN travel t ON t.id = e.travelFk
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo
|
||||
AND (vWarehouseFk IS NULL OR t.warehouseOutFk = vWarehouseFk)
|
||||
AND !e.isExcludedFromAvailable
|
||||
|
|
|
@ -21,9 +21,6 @@ BEGIN
|
|||
|
||||
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
|
||||
|
||||
-- Añadido temporalmente para que no se cuelgue la db
|
||||
SET vShowType = TRUE;
|
||||
|
||||
WITH itemTags AS (
|
||||
SELECT i.id,
|
||||
typeFk,
|
||||
|
@ -38,7 +35,7 @@ BEGIN
|
|||
t.name,
|
||||
it.value
|
||||
FROM vn.item i
|
||||
LEFT JOIN vn.itemTag it ON it.itemFk = i.id
|
||||
LEFT JOIN vn.itemTag it FORCE INDEX(itemTagItemPriority) ON it.itemFk = i.id
|
||||
AND it.priority = vPriority
|
||||
LEFT JOIN vn.tag t ON t.id = it.tagFk
|
||||
WHERE i.id = vSelf
|
||||
|
@ -68,7 +65,7 @@ BEGIN
|
|||
iss.visible located,
|
||||
b.price2
|
||||
FROM vn.item i
|
||||
JOIN cache.available a ON a.item_id = i.id
|
||||
JOIN cache.available a FORCE INDEX (calc_id) ON a.item_id = i.id
|
||||
AND a.calc_id = vCalcFk
|
||||
LEFT JOIN vn.itemProposal ip ON ip.mateFk = i.id
|
||||
AND ip.itemFk = vSelf
|
||||
|
|
Loading…
Reference in New Issue