Is_pl_account and debit_or_credit field removed and added report_type field in account

This commit is contained in:
Nabin Hait
2014-03-21 11:14:49 +05:30
parent b5e6d7e171
commit 0c21e2afef
45 changed files with 244 additions and 627 deletions

View File

@@ -285,8 +285,7 @@ def get_stock_and_account_difference(account_list=None, posting_date=None):
def validate_expense_against_budget(args):
args = frappe._dict(args)
if frappe.db.get_value("Account", {"name": args.account, "is_pl_account": "Yes",
"root_type": "Expense"}):
if frappe.db.get_value("Account", {"name": args.account, "report_type": "Profit and Loss"}):
budget = frappe.db.sql("""
select bd.budget_allocated, cc.distribution_id
from `tabCost Center` cc, `tabBudget Detail` bd