From 1c1953efe36b964a8047bfd3347346cc65db12d9 Mon Sep 17 00:00:00 2001 From: sharjeel khan Date: Fri, 13 May 2022 14:55:57 +0500 Subject: [PATCH] Attendance Controller Changes --- backend/controllers/attendance_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]