diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.json b/erpnext/projects/doctype/activity_cost/activity_cost.json index 0f37c5c7477..b44e3106be8 100644 --- a/erpnext/projects/doctype/activity_cost/activity_cost.json +++ b/erpnext/projects/doctype/activity_cost/activity_cost.json @@ -100,13 +100,13 @@ "allow_on_submit": 0, "default": "0", "description": "per hour", - "fieldname": "internal_rate", + "fieldname": "costing_rate", "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 0, - "label": "Internal Rate", + "label": "Costing Rate", "no_copy": 0, "permlevel": 0, "precision": "", @@ -135,7 +135,7 @@ "is_submittable": 0, "issingle": 0, "istable": 0, - "modified": "2015-03-25 07:50:46.554655", + "modified": "2015-04-01 02:06:37.510007", "modified_by": "Administrator", "module": "Projects", "name": "Activity Cost", diff --git a/erpnext/projects/doctype/time_log/time_log.js b/erpnext/projects/doctype/time_log/time_log.js index 6892d10228e..e1fa91b4aca 100644 --- a/erpnext/projects/doctype/time_log/time_log.js +++ b/erpnext/projects/doctype/time_log/time_log.js @@ -45,7 +45,7 @@ frappe.ui.form.on("Time Log", "to_time", function(frm) { }); var calculate_cost = function(doc) { - cur_frm.set_value("internal_cost", doc.internal_rate * doc.hours); + cur_frm.set_value("costing_amount", doc.costing_rate * doc.hours); if (doc.billable==1){ cur_frm.set_value("billing_amount", doc.billing_rate * doc.hours); } @@ -60,7 +60,7 @@ var get_activity_cost = function(frm) { }, callback: function(r) { if(!r.exc) { - cur_frm.set_value("internal_rate", r.message.internal_rate); + cur_frm.set_value("costing_rate", r.message.costing_rate); cur_frm.set_value("billing_rate", r.message.billing_rate); calculate_cost(frm.doc); } diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json index f52bcad3bc5..92ae856a62c 100644 --- a/erpnext/projects/doctype/time_log/time_log.json +++ b/erpnext/projects/doctype/time_log/time_log.json @@ -208,18 +208,18 @@ { "default": "0", "description": "per hour", - "fieldname": "internal_rate", + "fieldname": "costing_rate", "fieldtype": "Currency", - "label": "Internal Rate", + "label": "Costing Rate", "permlevel": 0, "precision": "", "read_only": 1 }, { "default": "0", - "fieldname": "internal_cost", + "fieldname": "costing_amount", "fieldtype": "Currency", - "label": "Internal Cost", + "label": "Costing Amount", "permlevel": 0, "precision": "", "read_only": 1 diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py index 1f70221f107..fc6ae5331bf 100644 --- a/erpnext/projects/doctype/time_log/time_log.py +++ b/erpnext/projects/doctype/time_log/time_log.py @@ -217,9 +217,9 @@ class TimeLog(Document): def validate_cost(self): rate = get_activity_cost(self.employee, self.activity_type) - self.internal_rate = rate.get('internal_rate') - self.billing_rate = rate.get('billing_rate') - self.internal_cost = self.internal_rate * self.hours + self.costing_rate = rate.get('costing_rate') or 0 + self.billing_rate = rate.get('billing_rate') or 0 + self.costing_amount = self.costing_rate * self.hours if self.billable: self.billing_amount = self.billing_rate * self.hours else: @@ -281,7 +281,7 @@ def get_events(start, end, filters=None): @frappe.whitelist() def get_activity_cost(employee=None, activity_type=None): - internal_rate = frappe.db.get_value("Activity Cost", {"employee":employee,"activity_type":activity_type}, "internal_rate") + costing_rate = frappe.db.get_value("Activity Cost", {"employee":employee,"activity_type":activity_type}, "costing_rate") billing_rate = frappe.db.get_value("Activity Cost", {"employee":employee,"activity_type":activity_type}, "billing_rate") - return {"internal_rate": internal_rate, "billing_rate": billing_rate } + return {"costing_rate": costing_rate, "billing_rate": billing_rate }