feat(ssalix): refs #7671 #7671 checkDates

This commit is contained in:
Javier Segarra 2024-07-11 06:17:19 +02:00
parent 1be04babe4
commit ea626821fc
1 changed files with 7 additions and 0 deletions

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));