mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
fixes in Purchase Invoice
This commit is contained in:
@@ -91,8 +91,8 @@ class Project(Document):
|
||||
self.per_gross_margin = (self.gross_margin / flt(self.total_billing_amount)) *100
|
||||
|
||||
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 or 0
|
||||
self.total_purchase_cost = frappe.db.sql("""select sum(amount) as cost
|
||||
from `tabPurchase Invoice Item` where project_name = %s and docstatus=1 """, self.name, as_dict=1)[0].cost or 0
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_cost_center_name(project_name):
|
||||
|
||||
Reference in New Issue
Block a user