[fix] [minor] fix available qty even if 0

This commit is contained in:
Rushabh Mehta 2015-12-22 12:57:42 +05:30
parent 381cec7b87
commit 01293bb3a3

View File

@ -360,7 +360,7 @@ def get_projected_qty(item_code, warehouse):
@frappe.whitelist()
def get_available_qty(item_code, warehouse):
return frappe.db.get_value("Bin", {"item_code": item_code, "warehouse": warehouse},
["projected_qty", "actual_qty"], as_dict=True) or {}
["projected_qty", "actual_qty"], as_dict=True) or {"projected_qty": 0, "actual_qty": 0}
@frappe.whitelist()
def get_batch_qty(batch_no,warehouse,item_code):