#7010 added filter fields to show packing type field in ticket list #3024

Merged
jon merged 6 commits from 7010-AddPackingField into dev 2024-10-18 07:40:36 +00:00
1 changed files with 51 additions and 45 deletions

View File

@ -228,7 +228,7 @@ module.exports = Self => {
stmt = new ParameterizedSQL(`
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
(INDEX (id))
ENGINE = MEMORY
ENGINE = InnoDB
SELECT t.id,
jon marked this conversation as resolved Outdated
Outdated
Review

Crec que no cal el distimct

Crec que no cal el distimct
t.shipped,
CAST(DATE(t.shipped) AS CHAR) shippedDate,
@ -260,7 +260,12 @@ module.exports = Self => {
z.name zoneName,
z.id zoneFk,
CAST(z.hour AS CHAR) hour,
a.nickname addressNickname
a.nickname addressNickname,
(SELECT GROUP_CONCAT(DISTINCT i2.itemPackingTypeFk ORDER BY i2.itemPackingTypeFk SEPARATOR ',')
FROM sale s2
JOIN item i2 ON i2.id = s2.itemFk
WHERE s2.ticketFk = t.id
) AS packing
FROM ticket t
LEFT JOIN invoiceOut io ON t.refFk = io.ref
LEFT JOIN zone z ON z.id = t.zoneFk
@ -292,6 +297,7 @@ module.exports = Self => {
}
stmt.merge(conn.makeWhere(filter.where));
stmts.push(stmt);
stmt = new ParameterizedSQL(`