refactor: refs #7912 Requested changes
gitea/salix/pipeline/pr-dev Build queued... Details

This commit is contained in:
Guillermo Bonet 2025-02-28 13:01:49 +01:00
parent 4190dc7803
commit 076f4f3173
1 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ BEGIN
* @param vDateTo Fecha hasta
*/
DECLARE vDaysInYear INT;
SET vDaysInYear = DATEDIFF(util.lastDayOfYear(CURDATE()), util.firstDayOfYear(CURDATE()));
SET vDaysInYear = DATEDIFF(util.lastDayOfYear(util.VN_CURDATE()), util.firstDayOfYear(util.VN_CURDATE()));
SET vDateFrom = COALESCE(vDateFrom, util.VN_CURDATE());
SET vDateTo = COALESCE(vDateTo, util.VN_CURDATE());
@ -41,7 +41,7 @@ BEGIN
JOIN vn.entry e ON e.id = b.entryFk
JOIN vn.travel tr ON tr.id = e.travelFk
JOIN vn.warehouse w ON w.id = tr.warehouseInFk
WHERE tr.landed BETWEEN CURDATE() - INTERVAL 1 WEEK AND CURDATE()
WHERE tr.landed BETWEEN util.VN_CURDATE() - INTERVAL 1 WEEK AND util.VN_CURDATE()
AND e.supplierFk NOT IN (
(SELECT supplierFk FROM vn.inventoryConfig),
(SELECT id FROM vn.supplier WHERE name = 'ARREGLOS STOCK')
@ -63,7 +63,7 @@ BEGIN
JOIN vn.travel tr ON tr.id = e.travelFk
JOIN vn.warehouse w ON w.id = tr.warehouseInFk
JOIN vn.supplier s ON s.id = e.supplierFk
WHERE tr.landed BETWEEN CURDATE() - INTERVAL 1 YEAR AND CURDATE()
WHERE tr.landed BETWEEN util.VN_CURDATE() - INTERVAL 1 YEAR AND util.VN_CURDATE()
AND s.isReal
)
SELECT bn.warehouseFk,
@ -88,7 +88,7 @@ BEGIN
JOIN vn.travel tr ON tr.id = e.travelFk
JOIN vn.warehouse w ON w.id = tr.warehouseInFk
JOIN vn.supplier s ON s.id = e.supplierFk
WHERE tr.landed BETWEEN CURDATE() - INTERVAL 1 YEAR AND CURDATE()
WHERE tr.landed BETWEEN util.VN_CURDATE() - INTERVAL 1 YEAR AND util.VN_CURDATE()
)
SELECT bn.warehouseFk,
b.itemFk,