fix: filters and some conditions

This commit is contained in:
Anurag Mishra 2019-04-09 14:34:56 +05:30
parent 17fbafa390
commit 3e8b8a4359
3 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ def get_data(filters):
from_date = frappe.utils.get_datetime(filters.from_date) from_date = frappe.utils.get_datetime(filters.from_date)
to_date = frappe.utils.get_datetime(filters.to_date) to_date = frappe.utils.get_datetime(filters.to_date)
if time_start <= from_date and time_end <= to_date: if time_start <= from_date and time_end >= from_date:
total_hours, total_billable_hours, total_amount = get_billable_and_total_hours(activity, total_hours, total_billable_hours, total_amount = get_billable_and_total_hours(activity,
time_end, from_date, total_hours, total_billable_hours, total_amount) time_end, from_date, total_hours, total_billable_hours, total_amount)

View File

@ -22,7 +22,7 @@ frappe.query_reports["Employee Billing Summary"] = {
fieldname:"to_date", fieldname:"to_date",
label: __("To Date"), label: __("To Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.datetime.month_start(), default: frappe.datetime.add_days(frappe.datetime.month_start(), -1),
reqd: 1 reqd: 1
}, },
] ]

View File

@ -22,7 +22,7 @@ frappe.query_reports["Project Billing Summary"] = {
fieldname:"to_date", fieldname:"to_date",
label: __("To Date"), label: __("To Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.datetime.month_start(), default: frappe.datetime.add_days(frappe.datetime.month_start(),-1),
reqd: 1 reqd: 1
}, },
] ]