From a1716543c2e72b94b9ceeab326cf4d873b631cd3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 18 Jan 2013 14:26:43 +0530 Subject: [PATCH] fixes in stock entry --- stock/doctype/stock_entry/stock_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py index 12e69e6e94..e10defdebf 100644 --- a/stock/doctype/stock_entry/stock_entry.py +++ b/stock/doctype/stock_entry/stock_entry.py @@ -178,6 +178,7 @@ class DocType(TransactionBase): d.amount = flt(d.qty) * flt(d.incoming_rate) def get_incoming_rate(self, args): + incoming_rate = 0 if self.doc.purpose == "Sales Return" and \ (self.doc.delivery_note_no or self.doc.sales_invoice_no): sle = webnotes.conn.sql("""select name, posting_date, posting_time,