mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
fix: shopping cart item availability
This commit is contained in:
@@ -32,7 +32,7 @@ frappe.ready(function() {
|
|||||||
if(r.message.product_info.in_stock===0) {
|
if(r.message.product_info.in_stock===0) {
|
||||||
$(".item-stock").html("<div style='color: red'> <i class='fa fa-close'></i> {{ _("Not in stock") }}</div>");
|
$(".item-stock").html("<div style='color: red'> <i class='fa fa-close'></i> {{ _("Not in stock") }}</div>");
|
||||||
}
|
}
|
||||||
else if(r.message.product_info.in_stock===1) {
|
else if(r.message.product_info.in_stock===1 && r.message.cart_settings.show_stock_availability) {
|
||||||
var qty_display = "{{ _("In stock") }}";
|
var qty_display = "{{ _("In stock") }}";
|
||||||
if (r.message.product_info.show_stock_qty) {
|
if (r.message.product_info.show_stock_qty) {
|
||||||
qty_display += " ("+r.message.product_info.stock_qty+")";
|
qty_display += " ("+r.message.product_info.stock_qty+")";
|
||||||
|
|||||||
Reference in New Issue
Block a user