Test Cases Added

This commit is contained in:
Neil Trini Lasrado
2015-04-28 16:29:58 +05:30
parent 9a56764bf2
commit 349461e9e6
3 changed files with 33 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ class Project(Document):
def update_purchase_costing(self):
self.total_purchase_cost = frappe.db.sql("""select sum(grand_total) as cost
from `tabPurchase Invoice` where project = %s and docstatus=1 """, self.name, as_dict=1)[0].cost
from `tabPurchase Invoice` where project = %s and docstatus=1 """, self.name, as_dict=1)[0].cost or 0
@frappe.whitelist()
def get_cost_center_name(project_name):