From 6f71648719ca7d1f01cff0d938898b5623e96633 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Tue, 13 Jun 2017 14:36:30 +0530 Subject: [PATCH] [minor] removed the else condition in update_qty --- erpnext/stock/doctype/bin/bin.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index 33b97c93f10..75510decd3c 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -56,15 +56,6 @@ class Bin(Document): if args.get("voucher_type")=="Stock Reconciliation": if args.get('is_cancelled') == 'No': self.actual_qty = args.get("qty_after_transaction") - else: - qty_after_transaction = frappe.db.get_value("""select qty_after_transaction - from `tabStock Ledger Entry` - where item_code=%s and warehouse=%s - and not (voucher_type='Stock Reconciliation' and voucher_no=%s) - order by posting_date desc limit 1""", - (self.item_code, self.warehouse, args.get('voucher_no'))) - - self.actual_qty = flt(qty_after_transaction[0][0]) if qty_after_transaction else 0.0 else: self.actual_qty = flt(self.actual_qty) + flt(args.get("actual_qty"))