How to make complex reports like attendance report, where I need to calculate and add a custom field named "Status" in which user will be marked as P/A etc. according to their punch timings.
I am fetching data using this code :-
function beforeRender(request, response, done) {
con.connect(function(err) {
if (err) throw err;
con.query("select * from attendance_report2 where emp_id = '710101'", function(err, result, fields) {
if (err) throw err;
Object.assign(request.data, {
employees: result
})
// return request.data;
done();
});
});
}