Merge pull request 'master' (!2408) from master into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/pr-master This commit looks good Details

Reviewed-on: #2408
Reviewed-by: Jorge Penades <jorgep@verdnatura.es>
This commit is contained in:
Carlos Andrés 2024-05-06 12:22:04 +00:00
commit 14a1c5cbbb
4 changed files with 11 additions and 3 deletions

View File

@ -131,7 +131,8 @@ BEGIN
DELETE e DELETE e
FROM entry e FROM entry e
JOIN tEntryToDelete tmp ON tmp.id = e.id; JOIN tEntryToDelete tmp ON tmp.id = e.id
WHERE NOT e.isBooked;
-- borrar de route registros menores a 4 años -- borrar de route registros menores a 4 años
CREATE OR REPLACE TEMPORARY TABLE tRouteToDelete CREATE OR REPLACE TEMPORARY TABLE tRouteToDelete

View File

@ -52,6 +52,10 @@ BEGIN
SELECT LAST_INSERT_ID() INTO vSaleFk; SELECT LAST_INSERT_ID() INTO vSaleFk;
UPDATE sale
SET originalQuantity = 0
WHERE id = vSaleFk;
CALL sale_calculateComponent(vSaleFk, NULL); CALL sale_calculateComponent(vSaleFk, NULL);
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -26,7 +26,7 @@ BEGIN
FROM workerTimeControl FROM workerTimeControl
WHERE userFk = vWorkerFk WHERE userFk = vWorkerFk
AND direction = 'middle' AND direction = 'middle'
AND timed BETWEEN vLastIn AND util.VN_NOW(); AND timed BETWEEN vLastIn AND vTimed;
DROP TEMPORARY TABLE IF EXISTS tmp.workerTimeControlDirection; DROP TEMPORARY TABLE IF EXISTS tmp.workerTimeControlDirection;
CREATE TEMPORARY TABLE tmp.workerTimeControlDirection CREATE TEMPORARY TABLE tmp.workerTimeControlDirection

View File

@ -27,8 +27,11 @@ module.exports = Self => {
const where = filter.where; const where = filter.where;
const query = 'CALL vn.item_getBalance(?, ?, ?)'; const query = 'CALL vn.item_getBalance(?, ?, ?)';
if (where?.date) {
where.date = new Date(where.date);
where.date.setHours(0, 0, 0, 0);
}
const [diary] = await Self.rawSql(query, [where.itemFk, where.warehouseFk, where.date], myOptions); const [diary] = await Self.rawSql(query, [where.itemFk, where.warehouseFk, where.date], myOptions);
for (const entry of diary) for (const entry of diary)
if (entry.clientType === 'loses') entry.highlighted = true; if (entry.clientType === 'loses') entry.highlighted = true;