7152-devToTest_2414 #2228

Merged
alexm merged 636 commits from 7152-devToTest_2414 into test 2024-03-28 08:26:34 +00:00
1 changed files with 7 additions and 2 deletions
Showing only changes of commit caf99a9738 - Show all commits

View File

@ -19,7 +19,12 @@ module.exports = Self => {
}
});
Self.getUncheckedTicket = async ticketFk => {
Self.getUncheckedTicket = async(ticketFk, options) => {
const myOptions = {};
if (typeof options == 'object')
Object.assign(myOptions, options);
const result = await Self.rawSql(`
SELECT tc2.ticketFk
FROM vn.ticketCollection tc
@ -29,7 +34,7 @@ module.exports = Self => {
JOIN vn.state s2 ON s2.code = 'CHECKED'
WHERE tc.ticketFk = ? AND s.order < s2.id
LIMIT 1;`,
[ticketFk]);
[ticketFk], myOptions);
return result.length > 0 && result[0]['ticketFk'] > 0;
};
};