Skip to content

Commit d3c4e19

Browse files
committed
fix date comprehension
1 parent c813b45 commit d3c4e19

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

reports/design/lib/bids.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,10 @@ function check_award_for_bid(tender, bid) {
260260
if (date === null) {
261261
date = award.date;
262262
}
263-
checker = (['active', 'pending', 'cancelled'].indexOf(award.status) !== -1 && (date >= award.date));
263+
if (award.date >= date) {
264+
date = award.date;
265+
checker = (['active', 'pending', 'cancelled'].indexOf(award.status) !== -1);
266+
}
264267
}
265268
});
266269
return ((checker) || (!is_awarded));
@@ -276,7 +279,10 @@ function check_award_for_bid_multilot(tender, bid, lot) {
276279
if (date === null) {
277280
date = award.date;
278281
}
279-
checker = (['active', 'pending', 'cancelled'].indexOf(award.status) !== -1 && (date >= award.date));
282+
if (award.date >= date) {
283+
date = award.date;
284+
checker = (['active', 'pending', 'cancelled'].indexOf(award.status) !== -1);
285+
}
280286
}
281287
});
282288
// this check is unnecessary

0 commit comments

Comments
 (0)