This commit is contained in:
Dobie Wollert
2014-02-18 01:30:05 -05:00
parent cfcafd74ac
commit c63d462188
4 changed files with 153 additions and 52 deletions

View File

@ -11,7 +11,8 @@ exports.index = function(req, res) {
Workorder
.find({
deleted: false,
'scheduling.start': { '$gte': start, '$lt': end }
'scheduling.start': { '$lte': end },
'scheduling.end': { '$gte': start }
})
.populate('techs', 'name')
.populate('client', 'name identifier address')