feat: Cost center for each expenses in expense claim and allowed deferred expense (#19807)

* refactor: Expense Claim Cost Center

* refactor: Expense Claim Cost Center

* refactor: Expense Claim Cost Center

* fix: copy cost center from other row

* patch: set cost center in children based on parent

* fix: test cases for expense claim
This commit is contained in:
Nabin Hait
2019-12-10 08:40:10 +05:30
committed by GitHub
parent 5998034b02
commit 6f68f2d020
9 changed files with 160 additions and 513 deletions

View File

@@ -0,0 +1,8 @@
import frappe
def execute():
frappe.reload_doc('hr', 'doctype', 'expense_claim_detail')
frappe.db.sql("""
UPDATE `tabExpense Claim Detail` child, `tabExpense Claim` par
SET child.cost_center = par.cost_center
WHERE child.parent = par.name
""")