Skip to content

Commit 8fb018d

Browse files
fix: allow edit is enabled in the pos profile still user not able to edit the rates
1 parent 1a5c0b3 commit 8fb018d

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

erpnext/selling/page/point_of_sale/point_of_sale.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,17 @@ class POSCart {
737737

738738
const customer = this.frm.doc.customer;
739739
this.customer_field.set_value(customer);
740+
741+
if (this.numpad) {
742+
const disable_btns = this.disable_numpad_control()
743+
const enable_btns = [__('Rate'), __('Disc')]
744+
745+
if (disable_btns) {
746+
enable_btns.filter(btn => !disable_btns.includes(btn))
747+
}
748+
749+
this.numpad.enable_buttons(enable_btns);
750+
}
740751
}
741752

742753
get_grand_total() {
@@ -1507,6 +1518,16 @@ class NumberPad {
15071518
}
15081519
}
15091520

1521+
enable_buttons(btns) {
1522+
btns.forEach((btn) => {
1523+
const $btn = this.get_btn(btn);
1524+
$btn.prop("disabled", false)
1525+
$btn.hover(() => {
1526+
$btn.css('cursor','pointer');
1527+
})
1528+
})
1529+
}
1530+
15101531
set_class() {
15111532
for (const btn in this.add_class) {
15121533
const class_name = this.add_class[btn];

0 commit comments

Comments
 (0)