parent
1be04babe4
commit
ea626821fc
|
@ -137,6 +137,7 @@ module.exports = Self => {
|
|||
SELECT fp.id,
|
||||
fp.itemFk,
|
||||
fp.warehouseFk,
|
||||
w.name as warehouseName,
|
||||
fp.rate2,
|
||||
fp.rate3,
|
||||
fp.started,
|
||||
|
@ -160,6 +161,7 @@ module.exports = Self => {
|
|||
FROM priceFixed fp
|
||||
JOIN item i ON i.id = fp.itemFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN warehouse w ON fp.warehouseFk = w.id
|
||||
`);
|
||||
|
||||
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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue