fix: hide images from cart & details
This commit is contained in:
parent
54cc1dedf2
commit
ea70f6f933
@ -625,7 +625,7 @@ erpnext.PointOfSale.ItemCart = class {
|
|||||||
|
|
||||||
function get_item_image_html() {
|
function get_item_image_html() {
|
||||||
const { image, item_name } = item_data;
|
const { image, item_name } = item_data;
|
||||||
if (image) {
|
if (!me.hide_images && image) {
|
||||||
return `
|
return `
|
||||||
<div class="item-image">
|
<div class="item-image">
|
||||||
<img
|
<img
|
||||||
|
@ -2,6 +2,7 @@ erpnext.PointOfSale.ItemDetails = class {
|
|||||||
constructor({ wrapper, events, settings }) {
|
constructor({ wrapper, events, settings }) {
|
||||||
this.wrapper = wrapper;
|
this.wrapper = wrapper;
|
||||||
this.events = events;
|
this.events = events;
|
||||||
|
this.hide_images = settings.hide_images;
|
||||||
this.allow_rate_change = settings.allow_rate_change;
|
this.allow_rate_change = settings.allow_rate_change;
|
||||||
this.allow_discount_change = settings.allow_discount_change;
|
this.allow_discount_change = settings.allow_discount_change;
|
||||||
this.current_item = {};
|
this.current_item = {};
|
||||||
@ -124,7 +125,7 @@ erpnext.PointOfSale.ItemDetails = class {
|
|||||||
this.$item_name.html(item_name);
|
this.$item_name.html(item_name);
|
||||||
this.$item_description.html(get_description_html());
|
this.$item_description.html(get_description_html());
|
||||||
this.$item_price.html(format_currency(price_list_rate, this.currency));
|
this.$item_price.html(format_currency(price_list_rate, this.currency));
|
||||||
if (image) {
|
if (!this.hide_images && image) {
|
||||||
this.$item_image.html(
|
this.$item_image.html(
|
||||||
`<img
|
`<img
|
||||||
onerror="cur_pos.item_details.handle_broken_image(this)"
|
onerror="cur_pos.item_details.handle_broken_image(this)"
|
||||||
|
Loading…
Reference in New Issue
Block a user