chore: clean-up

- set default date filters for last month instead of year

- added abbreviations for columns to use them in the metrics labels
This commit is contained in:
Rucha Mahabal 2021-04-26 11:18:32 +05:30
parent 0decc2b66a
commit 2a1a472371
2 changed files with 19 additions and 19 deletions

View File

@ -16,14 +16,14 @@ frappe.query_reports["Employee Hours Utilization Based On Timesheet"] = {
fieldname: "from_date", fieldname: "from_date",
label: __("From Date"), label: __("From Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.defaults.get_global_default("year_start_date"), default: frappe.datetime.add_months(frappe.datetime.get_today(), -1),
reqd: 1 reqd: 1
}, },
{ {
fieldname:"to_date", fieldname:"to_date",
label: __("To Date"), label: __("To Date"),
fieldtype: "Date", fieldtype: "Date",
default: frappe.defaults.get_global_default("year_end_date"), default: frappe.datetime.now_date(),
reqd: 1 reqd: 1
}, },
{ {

View File

@ -57,34 +57,34 @@ class EmployeeHoursReport:
'options': 'Department', 'options': 'Department',
'fieldname': 'department', 'fieldname': 'department',
'fieldtype': 'Link', 'fieldtype': 'Link',
'width': 120
},
{
'label': _('Total Hours (T)'),
'fieldname': 'total_hours',
'fieldtype': 'Float',
'width': 120
},
{
'label': _('Billed Hours (B)'),
'fieldname': 'billed_hours',
'fieldtype': 'Float',
'width': 170 'width': 170
}, },
{ {
'label': _('Total Hours'), 'label': _('Non-Billed Hours (NB)'),
'fieldname': 'total_hours',
'fieldtype': 'Float',
'width': 150
},
{
'label': _('Billed Hours'),
'fieldname': 'billed_hours',
'fieldtype': 'Float',
'width': 150
},
{
'label': _('Non-Billed Hours'),
'fieldname': 'non_billed_hours', 'fieldname': 'non_billed_hours',
'fieldtype': 'Float', 'fieldtype': 'Float',
'width': 150 'width': 170
}, },
{ {
'label': _('Untracked Hours'), 'label': _('Untracked Hours (U)'),
'fieldname': 'untracked_hours', 'fieldname': 'untracked_hours',
'fieldtype': 'Float', 'fieldtype': 'Float',
'width': 150 'width': 170
}, },
{ {
'label': _('% Utilization (Billed Hours + Non-Billed Hours / Total Hours)'), 'label': _('% Utilization (B + NB) / T'),
'fieldname': 'per_util', 'fieldname': 'per_util',
'fieldtype': 'Percentage', 'fieldtype': 'Percentage',
'width': 200 'width': 200