hotFix: workerTimeControl use department.hasToRefill

This commit is contained in:
Alex Moreno 2024-02-19 12:31:14 +01:00
parent 9182549b47
commit 8328dd6f4c
1 changed files with 4 additions and 3 deletions

View File

@ -149,7 +149,8 @@ module.exports = Self => {
FROM tmp.timeControlError tce
JOIN vn.workerTimeControl wtc ON wtc.id = tce.id
)sub ON sub.userFk = tb.userFk
WHERE sub.userFK IS NULL
WHERE d.hasToRefill
AND sub.userFK IS NULL
AND IFNULL(?, u.id) = u.id
AND b.companyCodeFk = 'VNL'
AND w.businessFk
@ -163,7 +164,7 @@ module.exports = Self => {
const sql = ParameterizedSQL.join(stmts, ';');
const days = await conn.executeStmt(sql, myOptions);
console.log(days[index][0]);
let previousWorkerFk = days[index][0].workerFk;
let previousReceiver = days[index][0].receiver;
@ -356,7 +357,7 @@ module.exports = Self => {
previousReceiver = day.receiver;
}
if (tx) await tx.commit();
if (tx) await tx.rollback();
} catch (e) {
const stmts = [];
let stmt;