frappe.query_reports[“Employee Checkin Summery”] = {
“filters”: [
{
“fieldname”:“employee”,
“label”: __(“Employee”),
“fieldtype”: “Link”,
“options”: “Employee”,
“reqd”:1
},
{
“fieldname”:“fromdate”,
“label”: __(“From Date”),
“fieldtype”: “Date”,
“default”: frappe.datetime.get_today(),
“reqd”:1
},
{
“fieldname”:“todate”,
“label”: __(“To Date”),
“fieldtype”: “Date”,
“default”: frappe.datetime.get_today(),
“reqd”:1
},
{
“fieldname”:“shift_sett”,
“label”: __(“Shift Settings”),
“fieldtype”: “Link”,
“options”: “Shift Settings”,
“reqd”:1
}
],
formatter: function(value, row, column, data, default_formatter) {
value = default_formatter(value, row, column, data);
if (column.fieldname == "in_iime") {
let shift_start = frappe.db.get_value('Shift Settings', data.shift_sett , 'start_time');
if (data.in_iime || shift_start){
console.log(data.in_iime);
console.log(shift_start);
}
if (data.in_iime > shift_start) {
value = "<span style='background-color: #e12b2b; color:white;'><b> " + value + " </b></span>";
}
}
return value;
}
};
Why doesn’t it fetch field value (shift_start)
Please help and thank you very much