mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 02:34:41 +00:00
feat: Tick on checkbox to include draft timesheets (#36577)
feat: Tick on Check box to include Draft Timesheets
(cherry picked from commit 75652799cd)
Co-authored-by: ViralKansodiya <141210323+viralkansodiya@users.noreply.github.com>
This commit is contained in:
@@ -98,9 +98,11 @@ def get_timesheets(filters):
|
|||||||
record_filters = [
|
record_filters = [
|
||||||
["start_date", "<=", filters.to_date],
|
["start_date", "<=", filters.to_date],
|
||||||
["end_date", ">=", filters.from_date],
|
["end_date", ">=", filters.from_date],
|
||||||
["docstatus", "=", 1],
|
|
||||||
]
|
]
|
||||||
|
if not filters.get("include_draft_timesheets"):
|
||||||
|
record_filters.append(["docstatus", "=", 1])
|
||||||
|
else:
|
||||||
|
record_filters.append(["docstatus", "!=", 2])
|
||||||
if "employee" in filters:
|
if "employee" in filters:
|
||||||
record_filters.append(["employee", "=", filters.employee])
|
record_filters.append(["employee", "=", filters.employee])
|
||||||
|
|
||||||
|
|||||||
@@ -25,5 +25,10 @@ frappe.query_reports["Employee Billing Summary"] = {
|
|||||||
default: frappe.datetime.add_days(frappe.datetime.month_start(), -1),
|
default: frappe.datetime.add_days(frappe.datetime.month_start(), -1),
|
||||||
reqd: 1
|
reqd: 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldname:"include_draft_timesheets",
|
||||||
|
label: __("Include Timesheets in Draft Status"),
|
||||||
|
fieldtype: "Check",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,5 +25,10 @@ frappe.query_reports["Project Billing Summary"] = {
|
|||||||
default: frappe.datetime.add_days(frappe.datetime.month_start(),-1),
|
default: frappe.datetime.add_days(frappe.datetime.month_start(),-1),
|
||||||
reqd: 1
|
reqd: 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldname:"include_draft_timesheets",
|
||||||
|
label: __("Include Timesheets in Draft Status"),
|
||||||
|
fieldtype: "Check",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user