diff --git a/backend/controllers/attendance_controller.js b/backend/controllers/attendance_controller.js index 238a1bf..ca67646 100644 --- a/backend/controllers/attendance_controller.js +++ b/backend/controllers/attendance_controller.js @@ -158,7 +158,7 @@ module.exports.report = (req, res) => { 'Leave': { '$sum': { - $cond: [{ $eq: ['$TransactionType', "Leave"] }, 1, 0] + $cond: [{ $eq: ['$TransactionType', "Leave"] }, 1, 0], $cond: [{ $eq: ['$TransactionType', "Leave",'$ApprovedDetails', true ] }, 1, 0]