diff --git a/erpnext/e_commerce/product_ui/list.js b/erpnext/e_commerce/product_ui/list.js
index c8fd7672c8e..d82cc6c67e6 100644
--- a/erpnext/e_commerce/product_ui/list.js
+++ b/erpnext/e_commerce/product_ui/list.js
@@ -139,6 +139,12 @@ erpnext.ProductList = class {
${ __("Out of stock") }
`;
+ } else if (item.is_stock) {
+ return `
+
+ ${ __("In stock") }
+ `;
}
}
return ``;
diff --git a/erpnext/utilities/product.py b/erpnext/utilities/product.py
index e967f7061bb..5b8b6c67c79 100644
--- a/erpnext/utilities/product.py
+++ b/erpnext/utilities/product.py
@@ -33,7 +33,7 @@ def get_web_item_qty_in_stock(item_code, item_warehouse_field, warehouse=None):
for warehouse in warehouses:
stock_qty = frappe.db.sql(
"""
- select GREATEST(S.actual_qty - S.reserved_qty - S.reserved_qty_for_production - S.reserved_qty_for_sub_contract, 0) / IFNULL(C.conversion_factor, 1)
+ select S.actual_qty / IFNULL(C.conversion_factor, 1)
from tabBin S
inner join `tabItem` I on S.item_code = I.Item_code
left join `tabUOM Conversion Detail` C on I.sales_uom = C.uom and C.parent = I.Item_code