Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into 6861_reservas_retro
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-07-15 13:00:16 +02:00
parent 4d8482c503
commit 8df64013ee
1 changed files with 1 additions and 1 deletions

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 = ?;