fix(loads/observers): Affect proposals that are not completed, even if not accepted

This commit is contained in:
Josepablo C
2025-07-22 18:51:05 -06:00
parent 76915cfb57
commit 1d0e6e887f
3 changed files with 5 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
"use strict";
const { getModel } = require( '../../../../lib/Models' );
const { getPagination } = require( '../../../../lib/Misc.js' );
const { getPagination, normalizeDate } = require( '../../../../lib/Misc.js' );
const { GenericHandler } = require( '../../../../lib/Handlers/Generic.handler.js' );
const BranchesModel = getModel('branches');
@@ -81,8 +81,8 @@ function getAndFilterList( query ){
}
filter_list.push({
"est_loading_date" : {
$gte : new Date( est_loading_date["gte"] ),
$lte : new Date( est_loading_date["lte"] )
$gte : normalizeDate( est_loading_date["gte"] ),
$lte : normalizeDate( est_loading_date["lte"] )
}
});
}
@@ -96,8 +96,8 @@ function getAndFilterList( query ){
}
filter_list.push({
"est_unloading_date" : {
$gte : new Date( est_unloading_date["gte"] ),
$lte : new Date( est_unloading_date["lte"] )
$gte : normalizeDate( est_unloading_date["gte"] ),
$lte : normalizeDate( est_unloading_date["lte"] )
}
});
}