From 5e080f90396e7d3d125d7de3cbe7edc226fc8599 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 26 Sep 2014 15:05:30 +0530 Subject: [PATCH] Update utils.py --- erpnext/stock/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 0b32f7ebf7..31fc6a048e 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -176,7 +176,7 @@ def get_buying_amount(item_code, item_qty, voucher_type, voucher_no, item_row, s item_rate = frappe.db.sql("""select sum(base_amount) / sum(qty) from `tabPurchase Invoice Item` where item_code = %s and docstatus=1""" % ('%s'), item_code) - buying_amount = flt(item_qty) * flt(item_rate[0][0]) + buying_amount = flt(item_qty) * flt(item_rate[0][0]) if item_rate else 0 return buying_amount