add a floor date to prevent adjusting actual history based on the supplied timestamp
This commit is contained in:
parent
28c14ece67
commit
c48e52f95c
7
index.js
7
index.js
@ -691,5 +691,12 @@ function build_where(req, c, w, d, args) {
|
||||
args.push(req.body.scenario[i]);
|
||||
c = c + 1;
|
||||
};
|
||||
//if the request has a stamp, then it's an adjustment
|
||||
//prevent making adjustment to actual history by limiting to current stamp and beyond
|
||||
if (req.body.stamp) {
|
||||
w = w +
|
||||
`
|
||||
AND order_date >= '` + req.body.stamp + "'::date";
|
||||
}
|
||||
return { c, w, d };
|
||||
}
|
Loading…
Reference in New Issue
Block a user