[Fix] Budget not working properly

This commit is contained in:
Rohit Waghchaure
2017-01-19 14:22:29 +05:30
parent e2f4b35b11
commit 84b827efcd
4 changed files with 34 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
fields = {"Cost Center": "project", "Project": "cost_center"}
for budget_against, field in fields.items():
frappe.db.sql(""" update `tabBudget` set {field} = null
where budget_against = %s """.format(field = field), budget_against, debug=1)