Update sales_invoice.py
[fixes] pulling available qty on selection of item in case of pos
diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index 6871b1e..ab44247 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -351,7 +351,7 @@
if ret.get("warehouse"):
ret["actual_qty"] = flt(webnotes.conn.get_value("Bin",
- {"item_code": args.get("item_code"), "warehouse": args.get("warehouse")},
+ {"item_code": args.get("item_code"), "warehouse": ret.get("warehouse")},
"actual_qty"))
return ret