8144-devToTest_2444 #3137

Merged
alexm merged 90 commits from 8144-devToTest_2444 into test 2024-10-22 06:07:15 +00:00
1 changed files with 51 additions and 45 deletions
Showing only changes of commit 4ebda1a06f - Show all commits

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,
t.shipped,
CAST(DATE(t.shipped) AS CHAR) shippedDate,
@ -260,7 +260,8 @@ module.exports = Self => {
z.name zoneName,
z.id zoneFk,
CAST(z.hour AS CHAR) hour,
a.nickname addressNickname
a.nickname addressNickname,
GROUP_CONCAT(DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk SEPARATOR ', ') packing
FROM ticket t
LEFT JOIN invoiceOut io ON t.refFk = io.ref
LEFT JOIN zone z ON z.id = t.zoneFk
@ -274,6 +275,8 @@ module.exports = Self => {
LEFT JOIN worker wk ON wk.id = c.salesPersonFk
LEFT JOIN account.user u ON u.id = wk.id
LEFT JOIN route r ON r.id = t.routeFk
LEFT JOIN sale s ON t.id = s.ticketFk
LEFT JOIN item i ON i.id = s.itemFk
`);
if (args.orderFk) {
@ -292,6 +295,9 @@ module.exports = Self => {
}
stmt.merge(conn.makeWhere(filter.where));
stmt.merge({
sql: `GROUP BY t.id`
});
stmts.push(stmt);
stmt = new ParameterizedSQL(`