[fix] Project: round percent_complete to 2 decimals
This commit is contained in:
parent
9f25575e0c
commit
d387dd3bc6
@ -203,3 +203,4 @@ execute:frappe.delete_doc_if_exists("Print Format", "Credit Note - Negative Invo
|
||||
erpnext.patches.v6_0.set_default_title # 2015-09-03
|
||||
erpnext.patches.v6_0.default_activity_rate
|
||||
execute:frappe.db.set_value("Stock Settings", None, "automatically_set_serial_nos_based_on_fifo", 1)
|
||||
execute:frappe.db.sql("""update `tabProject` set percent_complete=round(percent_complete, 2) where percent_complete is not null""")
|
||||
|
@ -86,7 +86,7 @@ class Project(Document):
|
||||
completed = frappe.db.sql("""select count(*) from tabTask where
|
||||
project=%s and status in ('Closed', 'Cancelled')""", self.name)[0][0]
|
||||
|
||||
self.percent_complete = flt(completed) / total * 100
|
||||
self.percent_complete = flt(flt(completed) / total * 100, 2)
|
||||
|
||||
def update_costing(self):
|
||||
from_time_log = frappe.db.sql("""select
|
||||
|
Loading…
x
Reference in New Issue
Block a user