diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js
index 11a63b3d4a..8a989731cc 100644
--- a/erpnext/selling/page/point_of_sale/pos_item_cart.js
+++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js
@@ -636,13 +636,23 @@ erpnext.PointOfSale.ItemCart = class {
function get_item_image_html() {
const { image, item_name } = item_data;
if (image) {
- return `
`;
+ return `
+
+
+
`;
} else {
return `${frappe.get_abbr(item_name)}
`;
}
}
}
+ handle_broken_image($img) {
+ const item_abbr = $($img).attr('alt');
+ $($img).parent().replaceWith(`${item_abbr}
`);
+ }
+
scroll_to_item($item) {
if ($item.length === 0) return;
const scrollTop = $item.offset().top - this.$cart_items_wrapper.offset().top + this.$cart_items_wrapper.scrollTop();
diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js
index b8a82a9eda..b6109acc57 100644
--- a/erpnext/selling/page/point_of_sale/pos_item_selector.js
+++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js
@@ -94,7 +94,11 @@ erpnext.PointOfSale.ItemSelector = class {
${qty_to_display}
-
+
`;
} else {
return `
@@ -122,6 +126,11 @@ erpnext.PointOfSale.ItemSelector = class {
);
}
+ handle_broken_image($img) {
+ const item_abbr = $($img).attr('alt');
+ $($img).parent().replaceWith(`
${item_abbr}
`);
+ }
+
make_search_bar() {
const me = this;
const doc = me.events.get_frm().doc;