fix: track status for pending leaves
This commit is contained in:
parent
1db0fc91a5
commit
12a2b21465
@ -4,9 +4,8 @@
|
||||
// render
|
||||
frappe.listview_settings['Leave Allocation'] = {
|
||||
get_indicator: function(doc) {
|
||||
if(doc.status==="Expired") {
|
||||
return [__("Expired"), "darkgrey", "status, =, Expired"];
|
||||
}
|
||||
if(doc.status==="Expired") {
|
||||
return [__("Expired"), "darkgrey", "status, =, Expired"];
|
||||
}
|
||||
},
|
||||
right_column: "grand_total"
|
||||
};
|
||||
|
@ -496,6 +496,7 @@ def get_pending_leaves_for_period(employee, leave_type, from_date, to_date):
|
||||
"leave_type": leave_type,
|
||||
"from_date": ("<=", from_date),
|
||||
"to_date": (">=", to_date),
|
||||
"status": "Open"
|
||||
}, fieldname=['SUM(total_leave_days)']) or flt(0)
|
||||
|
||||
def get_remaining_leaves(allocation, leaves_taken, date, expiry):
|
||||
|
@ -89,5 +89,5 @@ def get_leave_encashment_records():
|
||||
encashment_date
|
||||
FROM `tabLeave Encashment`
|
||||
WHERE
|
||||
AND docstatus=1
|
||||
docstatus=1
|
||||
""", as_dict=1)
|
Loading…
Reference in New Issue
Block a user