mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
[fix] Project: round percent_complete to 2 decimals
This commit is contained in:
@@ -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.set_default_title # 2015-09-03
|
||||||
erpnext.patches.v6_0.default_activity_rate
|
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.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
|
completed = frappe.db.sql("""select count(*) from tabTask where
|
||||||
project=%s and status in ('Closed', 'Cancelled')""", self.name)[0][0]
|
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):
|
def update_costing(self):
|
||||||
from_time_log = frappe.db.sql("""select
|
from_time_log = frappe.db.sql("""select
|
||||||
|
|||||||
Reference in New Issue
Block a user