hotFix_workerTimeControl_reUse_hasToRefill #2049

Merged
alexm merged 4 commits from hotFix_workerTimeControl_reUse_hasToRefill into master 2024-02-20 11:30:25 +00:00
1 changed files with 4 additions and 3 deletions
Showing only changes of commit 8328dd6f4c - Show all commits

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;