From bb2bb03bccbd5b95b4f28ed3758843586d4e5191 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 10 Sep 2012 15:13:22 +0530 Subject: [PATCH] fix in bin reorder item condition --- erpnext/stock/doctype/bin/bin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index f2cd873e0f..442e4a79d7 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -344,7 +344,8 @@ class DocType: and t1.docstatus != 2 """, self.doc.item_code) - if ((flt(ret[0]['re_order_level']) > flt(current_qty[0][0])) and ret[0]['re_order_level']): + if ret[0]["re_order_level"] and current_qty and \ + (flt(ret[0]['re_order_level']) > flt(current_qty[0][0])): self.create_auto_indent(ret[0], doc_type, doc_name, current_qty[0][0])