fix: refs #6389 saleMonitor filter #3130

Open
carlossa wants to merge 12 commits from 6389-changesMonitor into dev
1 changed files with 6 additions and 1 deletions
Showing only changes of commit 99bec3e7fe - Show all commits

View File

@ -169,7 +169,7 @@ module.exports = Self => {
stmt = new ParameterizedSQL(`
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
(PRIMARY KEY (id))
ENGINE = MEMORY
ENGINE = InnoDB
SELECT t.id,
t.shipped,
CAST(DATE(t.shipped) AS CHAR) shippedDate,
@ -201,6 +201,11 @@ module.exports = Self => {
st.classColor,
d.id departmentFk,
d.name department,
(SELECT GROUP_CONCAT(DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk SEPARATOR ',')
FROM sale s
JOIN item i ON i.id = s.itemFk
WHERE s.ticketFk = t.id
) AS packing,
TIME_FORMAT(t.shipped, '%H:%i') preparationHour,
TIME_FORMAT(z.hour, '%H:%i') theoreticalhour,
TIME_FORMAT(zed.etc, '%H:%i') practicalHour