feat: Tick on checkbox to include draft timesheets (backport #36577) (#36640)

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:
mergify[bot]
2023-08-17 17:13:51 +05:30
committed by GitHub
parent 506ac10119
commit 9668615f7e
3 changed files with 14 additions and 2 deletions

View File

@@ -98,9 +98,11 @@ def get_timesheets(filters):
record_filters = [
["start_date", "<=", filters.to_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:
record_filters.append(["employee", "=", filters.employee])

View File

@@ -25,5 +25,10 @@ frappe.query_reports["Employee Billing Summary"] = {
default: frappe.datetime.add_days(frappe.datetime.month_start(), -1),
reqd: 1
},
{
fieldname:"include_draft_timesheets",
label: __("Include Timesheets in Draft Status"),
fieldtype: "Check",
},
]
}

View File

@@ -25,5 +25,10 @@ frappe.query_reports["Project Billing Summary"] = {
default: frappe.datetime.add_days(frappe.datetime.month_start(),-1),
reqd: 1
},
{
fieldname:"include_draft_timesheets",
label: __("Include Timesheets in Draft Status"),
fieldtype: "Check",
},
]
}