Merge pull request 'fix: #6634 Line count previa collection-label' (!1956) from 6634-hotfixColectionLabel into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1956
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Guillermo Bonet 2024-01-26 07:14:38 +00:00
commit 6488ea2f6c
2 changed files with 1 additions and 2 deletions

View File

@ -18,7 +18,6 @@ module.exports = {
}
},
async serverPrefetch() {
await this.rawSql('SET @hasPrevia := 0');
let ticketIds;
const res = await this.rawSqlFromDef('tickets', [this.id]);
if (res.length) {

View File

@ -16,7 +16,7 @@ SELECT c.itemPackingTypeFk code,
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
tt.labelCount,
t.nickName,
SUM(IF(sgd.id, IF(@hasPrevia, 0, @hasPrevia := 1), 1)) lineCount,
SUM(IF(sgd.id IS NULL, 1, 0)) + IF(sgd.id , 1, 0) lineCount,
rm.routeFk
FROM vn.ticket t
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id