UI fixes
diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css
index 0660b39..13fdcf1 100644
--- a/erpnext/public/css/erpnext.css
+++ b/erpnext/public/css/erpnext.css
@@ -308,16 +308,6 @@
body[data-route="pos"] .item-list .pos-item-wrapper {
position: relative;
}
-body[data-route="pos"] .item-list .price-info {
- position: absolute;
- left: 0;
- bottom: 0;
- margin: 0 0 15px 15px;
- background-color: rgba(141, 153, 166, 0.6);
- padding: 5px 9px;
- border-radius: 3px;
- color: #fff;
-}
body[data-route="pos"] .pos-bill-toolbar {
margin-top: 10px;
}
@@ -356,3 +346,13 @@
body[data-route="pos"] .collapse-btn {
cursor: pointer;
}
+.price-info {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ margin: 0 0 15px 15px;
+ background-color: rgba(141, 153, 166, 0.6);
+ padding: 5px 9px;
+ border-radius: 3px;
+ color: #fff;
+}
diff --git a/erpnext/public/css/pos.css b/erpnext/public/css/pos.css
index 10355f4..f66abc8 100644
--- a/erpnext/public/css/pos.css
+++ b/erpnext/public/css/pos.css
@@ -80,7 +80,8 @@
.pos-item-wrapper {
display: flex;
flex-direction: column;
- justify-content: space-between;
+ position: relative;
+ width: 25%;
}
.image-view-container {
display: block;
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less
index 6c616c9..de46c53 100644
--- a/erpnext/public/less/erpnext.less
+++ b/erpnext/public/less/erpnext.less
@@ -364,17 +364,6 @@
.pos-item-wrapper {
position: relative;
}
-
- .price-info {
- position: absolute;
- left: 0;
- bottom: 0;
- margin: 0 0 15px 15px;
- background-color: rgba(141, 153, 166, 0.6);
- padding: 5px 9px;
- border-radius: 3px;
- color: #fff;
- }
}
.pos-bill-toolbar {
@@ -423,4 +412,15 @@
.collapse-btn {
cursor: pointer;
}
+}
+
+.price-info {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ margin: 0 0 15px 15px;
+ background-color: rgba(141, 153, 166, 0.6);
+ padding: 5px 9px;
+ border-radius: 3px;
+ color: #fff;
}
\ No newline at end of file
diff --git a/erpnext/public/less/pos.less b/erpnext/public/less/pos.less
index b699a55..9653a82 100644
--- a/erpnext/public/less/pos.less
+++ b/erpnext/public/less/pos.less
@@ -108,7 +108,8 @@
.pos-item-wrapper {
display: flex;
flex-direction: column;
- justify-content: space-between;
+ position: relative;
+ width: 25%;
}
.image-view-container {
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js
index 4096ed4..cc1e3f1 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -39,6 +39,7 @@
this.bind_events();
},
() => this.make_new_invoice(),
+ () => this.page.set_title(__('Point of Sale'))
]);
}
@@ -584,7 +585,7 @@
const $item = this.$cart_items.find(`[data-item-code="${item.item_code}"]`);
if(item.qty > 0) {
$item.find('.quantity input').val(item.qty);
- $item.find('.discount').text(item.discount_percentage);
+ $item.find('.discount').text(item.discount_percentage + '%');
$item.find('.rate').text(format_currency(item.rate, this.frm.doc.currency));
} else {
$item.remove();
@@ -700,23 +701,23 @@
frappe.model.set_value(this.frm.doctype, this.frm.docname,
'additional_discount_percentage', e.target.value)
.then(() => {
- let discount_wrapper = this.wrapper.find('.discount_amount')
- discount_wrapper.val(this.frm.doc.discount_amount)
- discount_wrapper.trigger('change')
- })
- })
+ let discount_wrapper = this.wrapper.find('.discount_amount');
+ discount_wrapper.val(this.frm.doc.discount_amount);
+ discount_wrapper.trigger('change');
+ });
+ });
this.wrapper.find('.discount_amount').on('change', (e) => {
frappe.model.set_value(this.frm.doctype, this.frm.docname,
- 'discount_amount', e.target.value)
+ 'discount_amount', e.target.value);
this.frm.trigger('discount_amount')
.then(() => {
let discount_wrapper = this.wrapper.find('.additional_discount_percentage');
discount_wrapper.val(this.frm.doc.additional_discount_percentage);
- this.update_taxes_and_totals()
- this.update_grand_total()
- })
- })
+ this.update_taxes_and_totals();
+ this.update_grand_total();
+ });
+ });
}
set_selected_item($item) {