7642_createNewState #2736

Closed
sergiodt wants to merge 32 commits from 7642_createNewState into dev
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 8df64013ee - Show all commits

View File

@ -143,7 +143,7 @@ module.exports = Self => {
const [{stateCode}] = await Self.rawSql(` const [{stateCode}] = await Self.rawSql(`
SELECT SELECT
IF((SUM(CASE WHEN est.code = 'DELIVERED' THEN 1 ELSE 0 END) = COUNT(*)), IF((SUM(CASE WHEN est.code = 'DELIVERED' THEN 1 ELSE 0 END) = COUNT(*)),
'DELIVERED','PARTIAL_DELIVERED') stateForTicket 'DELIVERED','PARTIAL_DELIVERED') stateCode
FROM vn.expedition e FROM vn.expedition e
JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
WHERE e.ticketFk = ?; WHERE e.ticketFk = ?;