hotFix(getBalance): date setHours to 0
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
d18f08e676
commit
b8b055b86c
|
@ -27,8 +27,12 @@ module.exports = Self => {
|
|||
|
||||
const where = filter.where;
|
||||
const query = 'CALL vn.item_getBalance(?, ?, ?)';
|
||||
const [diary] = await Self.rawSql(query, [where.itemFk, where.warehouseFk, where.date], myOptions);
|
||||
|
||||
let date;
|
||||
if (where.date) {
|
||||
date = new Date(where.date);
|
||||
date.setHours(0, 0, 0, 0);
|
||||
}
|
||||
const [diary] = await Self.rawSql(query, [where.itemFk, where.warehouseFk, date], myOptions);
|
||||
for (const entry of diary)
|
||||
if (entry.clientType === 'loses') entry.highlighted = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue