Skip to content

Commit

Permalink
feat: Tick on Check box to include Draft Timesheets
Browse files Browse the repository at this point in the history
  • Loading branch information
viralkansodiya authored Aug 10, 2023
1 parent 5169006 commit 335d5d9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions erpnext/projects/report/billing_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
]
}

0 comments on commit 335d5d9

Please sign in to comment.