fix: order summary qty alignment
diff --git a/erpnext/public/scss/point-of-sale.scss b/erpnext/public/scss/point-of-sale.scss
index f388093..f975738 100644
--- a/erpnext/public/scss/point-of-sale.scss
+++ b/erpnext/public/scss/point-of-sale.scss
@@ -1067,6 +1067,7 @@
display: flex;
text-align: right;
margin-left: var(--margin-md);
+ justify-content: flex-end;
> .item-disc {
color: var(--dark-green-500);
diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js
index 28076db..4b75c0b 100644
--- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js
+++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js
@@ -333,9 +333,25 @@
doc.items.forEach((item, i) => {
const item_dom = this.get_item_html(doc, item);
this.$items_container.append(item_dom);
+ this.set_dynamic_rate_header_width();
});
}
+ set_dynamic_rate_header_width() {
+ const rate_cols = Array.from(this.$items_container.find(".item-rate-disc"));
+ this.$items_container.find(".item-rate-disc").css("width", "");
+ let max_width = rate_cols.reduce((max_width, elm) => {
+ if ($(elm).width() > max_width)
+ max_width = $(elm).width();
+ return max_width;
+ }, 0);
+
+ max_width += 1;
+ if (max_width == 1) max_width = "";
+
+ this.$items_container.find(".item-rate-disc").css("width", max_width);
+ }
+
attach_payments_info(doc) {
this.$payment_container.html('');
doc.payments.forEach(p => {