7953-devToTest_2438 #2942

Merged
alexm merged 199 commits from 7953-devToTest_2438 into test 2024-09-10 07:22:31 +00:00
1 changed files with 7 additions and 0 deletions
Showing only changes of commit ea626821fc - Show all commits

View File

@ -137,6 +137,7 @@ module.exports = Self => {
SELECT fp.id, SELECT fp.id,
fp.itemFk, fp.itemFk,
fp.warehouseFk, fp.warehouseFk,
w.name as warehouseName,
fp.rate2, fp.rate2,
fp.rate3, fp.rate3,
fp.started, fp.started,
@ -160,6 +161,7 @@ module.exports = Self => {
FROM priceFixed fp FROM priceFixed fp
JOIN item i ON i.id = fp.itemFk JOIN item i ON i.id = fp.itemFk
JOIN itemType it ON it.id = i.typeFk JOIN itemType it ON it.id = i.typeFk
JOIN warehouse w ON fp.warehouseFk = w.id
`); `);
if (ctx.args.tags) { if (ctx.args.tags) {
@ -183,6 +185,11 @@ module.exports = Self => {
} }
} }
} }
if (ctx.req.query.showBadDates === 'true') {
stmt.merge({
sql: `WHERE
fp.started< fp.ended `});
}
stmt.merge(conn.makeSuffix(filter)); stmt.merge(conn.makeSuffix(filter));