[fix] [typo] fixes #3193
This commit is contained in:
parent
874ead2ed9
commit
e991c9e075
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user