From 3e9fc558a8404946477b1153319782dc2d1a73af Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Mon, 21 Apr 2025 15:43:15 +0530 Subject: [PATCH 1/5] fix: item images on pos --- erpnext/public/scss/point-of-sale.scss | 20 +++++++++++++++++-- .../page/point_of_sale/pos_item_selector.js | 6 +++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/erpnext/public/scss/point-of-sale.scss b/erpnext/public/scss/point-of-sale.scss index 368013ec184..30c3c613712 100644 --- a/erpnext/public/scss/point-of-sale.scss +++ b/erpnext/public/scss/point-of-sale.scss @@ -153,9 +153,11 @@ margin-bottom: 0px; min-height: 8rem; height: 8rem; + overflow: hidden; > img { @extend .image; + width: 100%; } } @@ -395,9 +397,11 @@ border-radius: var(--border-radius-md); color: var(--text-light); margin-right: var(--margin-md); + overflow: hidden; > img { @extend .image; + width: 100%; } } @@ -699,14 +703,16 @@ display: flex; align-items: center; justify-content: center; - width: 11rem; - height: 11rem; + max-width: 11rem; + max-height: 11rem; border-radius: var(--border-radius-md); margin-left: var(--margin-md); color: var(--gray-500); + overflow: hidden; > img { @extend .image; + width: 100%; } > .item-abbr { @@ -1167,6 +1173,16 @@ } } +@media screen and (max-width: 1200px) { + .point-of-sale-app { + > .items-selector { + > .items-container { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + } + } +} + @media screen and (max-width: 620px) { .point-of-sale-app { grid-template-columns: repeat(1, minmax(0, 1fr)); 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 6ae0d675140..b5d90228a2f 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_selector.js +++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js @@ -104,11 +104,11 @@ erpnext.PointOfSale.ItemSelector = class { return `
${qty_to_display}
-
+
${frappe.get_abbr(item.item_name)}
`; } else { From 374da6882926dc66c2fc8c8f1b09062ef256ef42 Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Mon, 21 Apr 2025 15:53:13 +0530 Subject: [PATCH 2/5] fix: added gap in item details form --- erpnext/public/scss/point-of-sale.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/public/scss/point-of-sale.scss b/erpnext/public/scss/point-of-sale.scss index 30c3c613712..45164b6dd66 100644 --- a/erpnext/public/scss/point-of-sale.scss +++ b/erpnext/public/scss/point-of-sale.scss @@ -753,6 +753,7 @@ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--padding-md); + row-gap: var(--padding-sm); > .auto-fetch-btn { @extend .pointer-no-select; From e035120f417cf6c4714579fea7ade1ca083ce0df Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Mon, 21 Apr 2025 16:17:18 +0530 Subject: [PATCH 3/5] fix: item with no image --- erpnext/public/scss/point-of-sale.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/scss/point-of-sale.scss b/erpnext/public/scss/point-of-sale.scss index 45164b6dd66..f3de14887df 100644 --- a/erpnext/public/scss/point-of-sale.scss +++ b/erpnext/public/scss/point-of-sale.scss @@ -722,8 +722,8 @@ justify-content: center; border-radius: var(--border-radius-md); font-size: var(--text-3xl); - width: 100%; - height: 100%; + width: 11rem; + height: 11rem; } } } From 52d73de6b60ff105317ec96501469fee534b7b3c Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Mon, 21 Apr 2025 17:57:40 +0530 Subject: [PATCH 4/5] fix: cart item toggle highlight --- erpnext/selling/page/point_of_sale/pos_controller.js | 1 - erpnext/selling/page/point_of_sale/pos_item_cart.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index ef1693f8798..39f6af1e81e 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -376,7 +376,6 @@ erpnext.PointOfSale.Controller = class { highlight_cart_item: (item) => { const cart_item = this.cart.get_cart_item(item); - this.cart.toggle_item_highlight(cart_item); }, item_field_focused: (fieldname) => { 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 16bd15349d2..f166516fd93 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -280,7 +280,7 @@ erpnext.PointOfSale.ItemCart = class { toggle_item_highlight(item) { const $cart_item = $(item); - const item_is_highlighted = $cart_item.attr("style") == "background-color:var(--gray-50);"; + const item_is_highlighted = $cart_item.attr("style") == "background-color: var(--control-bg);"; if (!item || item_is_highlighted) { this.item_is_selected = false; From 83cf17f07c3a7ce97a0102db96fe12dba1226ca7 Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Mon, 21 Apr 2025 18:16:45 +0530 Subject: [PATCH 5/5] fix: row gap in item details form --- erpnext/public/scss/point-of-sale.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/scss/point-of-sale.scss b/erpnext/public/scss/point-of-sale.scss index f3de14887df..b8acaeae9a9 100644 --- a/erpnext/public/scss/point-of-sale.scss +++ b/erpnext/public/scss/point-of-sale.scss @@ -753,7 +753,7 @@ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--padding-md); - row-gap: var(--padding-sm); + row-gap: var(--padding-md); > .auto-fetch-btn { @extend .pointer-no-select;