mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 23:52:57 +00:00
Issue fixed in get stock qty if bin not exists
This commit is contained in:
@@ -93,7 +93,7 @@ class DocType:
|
|||||||
def get_as_on_stock(self, item, wh, dt, tm):
|
def get_as_on_stock(self, item, wh, dt, tm):
|
||||||
bin = sql("select name from tabBin where item_code = %s and warehouse = %s", (item, wh))
|
bin = sql("select name from tabBin where item_code = %s and warehouse = %s", (item, wh))
|
||||||
bin_id = bin and bin[0][0] or ''
|
bin_id = bin and bin[0][0] or ''
|
||||||
prev_sle = get_obj('Bin', bin_id).get_prev_sle(dt, tm)
|
prev_sle = bin_id and get_obj('Bin', bin_id).get_prev_sle(dt, tm) or {}
|
||||||
qty = flt(prev_sle.get('bin_aqat', 0))
|
qty = flt(prev_sle.get('bin_aqat', 0))
|
||||||
return qty
|
return qty
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user