mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
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:
@@ -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
|
||||
""")
|
||||
Reference in New Issue
Block a user