Merge pull request 'hotFix(getBalance): date setHours to 0' (!2390) from hotFix_getBalance into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2390 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
71f8e18b46
|
@ -27,8 +27,11 @@ module.exports = Self => {
|
|||
|
||||
const where = filter.where;
|
||||
const query = 'CALL vn.item_getBalance(?, ?, ?)';
|
||||
if (where?.date) {
|
||||
where.date = new Date(where.date);
|
||||
where.date.setHours(0, 0, 0, 0);
|
||||
}
|
||||
const [diary] = await Self.rawSql(query, [where.itemFk, where.warehouseFk, where.date], myOptions);
|
||||
|
||||
for (const entry of diary)
|
||||
if (entry.clientType === 'loses') entry.highlighted = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue