From d6757b7af6bcfd64406d8d11ba5e0eb2ec9ad088 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Tue, 16 Apr 2019 17:32:45 +0530 Subject: [PATCH] fix: total error arissing due to blank link field --- erpnext/projects/report/billing_summary.py | 16 ---------------- .../employee_billing_summary.json | 4 ++-- .../project_billing_summary.json | 4 ++-- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/erpnext/projects/report/billing_summary.py b/erpnext/projects/report/billing_summary.py index 4906ba9d997..d2a229315fd 100644 --- a/erpnext/projects/report/billing_summary.py +++ b/erpnext/projects/report/billing_summary.py @@ -54,9 +54,6 @@ def get_data(filters): data = [] record = get_records(filters) - billable_hours_worked = 0 - hours_worked = 0 - working_cost = 0 for entries in record: total_hours = 0 total_billable_hours = 0 @@ -81,11 +78,6 @@ def get_data(filters): total_hours, total_billable_hours, total_amount = get_billable_and_total_hours(activity, time_end, time_start, total_hours, total_billable_hours, total_amount) - - hours_worked += total_hours - billable_hours_worked += total_billable_hours - working_cost += total_amount - row = { "employee": entries.employee, "employee_name": entries.employee_name, @@ -97,14 +89,6 @@ def get_data(filters): if entries_exists: data.append(row) entries_exists = False - - total = { - "total_billable_hours": billable_hours_worked, - "total_hours": hours_worked, - "amount": working_cost - } - if billable_hours_worked !=0 or hours_worked !=0 or working_cost !=0: - data.append(total) return data def get_records(filters): diff --git a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json index 433ebac5ddf..cab8db251c8 100644 --- a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json +++ b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2019-03-08 15:08:19.929728", "disable_prepared_report": 0, "disabled": 0, @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "modified": "2019-03-08 15:08:19.929728", + "modified": "2019-04-16 17:29:18.376932", "modified_by": "Administrator", "module": "Projects", "name": "Employee Billing Summary", diff --git a/erpnext/projects/report/project_billing_summary/project_billing_summary.json b/erpnext/projects/report/project_billing_summary/project_billing_summary.json index a3f91c802d5..c65053e85be 100644 --- a/erpnext/projects/report/project_billing_summary/project_billing_summary.json +++ b/erpnext/projects/report/project_billing_summary/project_billing_summary.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2019-03-11 16:22:39.460524", "disable_prepared_report": 0, "disabled": 0, @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "modified": "2019-03-11 16:22:39.460524", + "modified": "2019-04-16 17:28:32.749633", "modified_by": "Administrator", "module": "Projects", "name": "Project Billing Summary",