Skip to content

Commit

Permalink
fix(Patient Encounter): show items actual qty in drug prescription
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajinsr committed Sep 4, 2024
1 parent 0382ae3 commit ab3899c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ def get_medications_query(doctype, txt, searchfield, start, page_len, filters):
default_warehouse = frappe.get_cached_value("Stock Settings", None, "default_warehouse")
if default_warehouse:
actual_qty = frappe.db.get_value(
"Bin", {"warehouse": default_warehouse, "item_code": d.get("name")}, "actual_qty"
"Bin", {"warehouse": default_warehouse, "item_code": d.get("item")}, "actual_qty"
)
display_list.append("Qty:" + str(actual_qty) if actual_qty else "0")
display_list.append("<br>Actual Qty : " + (str(actual_qty) if actual_qty else "0"))
data_list.append(display_list)
res = tuple(tuple(sub) for sub in data_list)
return res
Expand Down

0 comments on commit ab3899c

Please sign in to comment.