fix: #6634 Line count previa collection-label
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
66936d8983
commit
0c5225e3d0
|
@ -18,7 +18,6 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async serverPrefetch() {
|
async serverPrefetch() {
|
||||||
await this.rawSql('SET @hasPrevia := 0');
|
|
||||||
let ticketIds;
|
let ticketIds;
|
||||||
const res = await this.rawSqlFromDef('tickets', [this.id]);
|
const res = await this.rawSqlFromDef('tickets', [this.id]);
|
||||||
if (res.length) {
|
if (res.length) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ SELECT c.itemPackingTypeFk code,
|
||||||
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
||||||
tt.labelCount,
|
tt.labelCount,
|
||||||
t.nickName,
|
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
|
rm.routeFk
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
||||||
|
|
Loading…
Reference in New Issue