2019-01-22 18:22:20 +05:30
|
|
|
from __future__ import unicode_literals
|
2015-08-31 15:04:48 +05:30
|
|
|
import frappe
|
|
|
|
|
|
|
|
def execute():
|
2015-09-15 11:27:19 +05:30
|
|
|
frappe.reload_doc("projects", "doctype", "activity_cost")
|
|
|
|
|
2015-08-31 15:04:48 +05:30
|
|
|
for cost in frappe.db.get_list("Activity Cost", filters = {"employee": ""},
|
|
|
|
fields = ("name", "activity_type", "costing_rate", "billing_rate")):
|
|
|
|
activity_type = frappe.get_doc("Activity Type", cost.activity_type)
|
|
|
|
activity_type.costing_rate = cost.costing_rate
|
|
|
|
activity_type.billing_rate = cost.billing_rate
|
|
|
|
activity_type.save()
|
|
|
|
|
|
|
|
frappe.delete_doc("Activity Cost", cost.name)
|