From e991c9e075e75e0b41a8136c081e012921f765fb Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 4 May 2015 11:04:29 +0530 Subject: [PATCH] [fix] [typo] fixes #3193 --- erpnext/projects/doctype/project/project.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 89cf523c1e..d8513ff515 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -21,7 +21,7 @@ class Project(Document): "status": task.status, "start_date": task.exp_start_date, "end_date": task.exp_end_date, - "desciption": task.description, + "description": task.description, "task_id": task.name }) @@ -37,7 +37,7 @@ class Project(Document): def sync_tasks(self): """sync tasks and remove table""" if self.flags.dont_sync_tasks: return - + task_names = [] for t in self.tasks: if t.task_id: @@ -51,7 +51,7 @@ class Project(Document): "status": t.status, "exp_start_date": t.start_date, "exp_end_date": t.end_date, - "desciption": t.description, + "description": t.description, }) task.flags.ignore_links = True @@ -62,7 +62,7 @@ class Project(Document): # delete for t in frappe.get_all("Task", ["name"], {"project": self.name, "name": ("not in", task_names)}): frappe.delete_doc("Task", t.name) - + self.tasks = [] def update_percent_complete(self): @@ -73,13 +73,13 @@ class Project(Document): project=%s and status in ('Closed', 'Cancelled')""", self.name)[0][0] frappe.db.set_value("Project", self.name, "percent_complete", int(float(completed) / total * 100)) - + def update_costing(self): total_cost = frappe.db.sql("""select sum(total_costing_amount) as costing_amount, sum(total_billing_amount) as billing_amount, sum(total_expense_claim) as expense_claim, min(act_start_date) as start_date, max(act_end_date) as end_date, sum(actual_time) as time from `tabTask` where project = %s""", self.name, as_dict=1)[0] - + self.total_costing_amount = total_cost.costing_amount self.total_billing_amount = total_cost.billing_amount self.total_expense_claim = total_cost.expense_claim