From 849b7b172a38eba55505f4dc4f9af0b405275b6d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 7 Aug 2014 15:13:52 +0530 Subject: [PATCH] minor fix --- erpnext/accounts/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 7185216417..d1b65846d5 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -366,7 +366,7 @@ def get_currency_precision(currency=None): def get_stock_rbnb_difference(posting_date, company): stock_items = frappe.db.sql_list("""select distinct item_code - from `tabStock Ledger Entry` where comapny=%s""", company) + from `tabStock Ledger Entry` where company=%s""", company) pr_valuation_amount = frappe.db.sql(""" select sum(ifnull(pr_item.valuation_rate, 0) * ifnull(pr_item.qty, 0) * ifnull(pr_item.conversion_factor, 0)) @@ -386,7 +386,8 @@ def get_stock_rbnb_difference(posting_date, company): stock_rbnb = flt(pr_valuation_amount, 2) - flt(pi_valuation_amount, 2) # Balance as per system - sys_bal = get_balance_on("Stock Received But Not Billed - RIGPL", posting_date) + stock_rbnb_account = "Stock Received But Not Billed - " + frappe.db.get_value("Company", company, "abbr") + sys_bal = get_balance_on(stock_rbnb_account, posting_date) # Amount should be credited return flt(stock_rbnb) + flt(sys_bal)