fix: allow edit is enabled in the pos profile still user not able to edit the rates
This commit is contained in:
parent
93fc6004ad
commit
7efeffa66a
@ -779,6 +779,17 @@ class POSCart {
|
|||||||
|
|
||||||
const customer = this.frm.doc.customer;
|
const customer = this.frm.doc.customer;
|
||||||
this.customer_field.set_value(customer);
|
this.customer_field.set_value(customer);
|
||||||
|
|
||||||
|
if (this.numpad) {
|
||||||
|
const disable_btns = this.disable_numpad_control()
|
||||||
|
const enable_btns = [__('Rate'), __('Disc')]
|
||||||
|
|
||||||
|
if (disable_btns) {
|
||||||
|
enable_btns.filter(btn => !disable_btns.includes(btn))
|
||||||
|
}
|
||||||
|
|
||||||
|
this.numpad.enable_buttons(enable_btns);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get_grand_total() {
|
get_grand_total() {
|
||||||
@ -1551,6 +1562,16 @@ class NumberPad {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enable_buttons(btns) {
|
||||||
|
btns.forEach((btn) => {
|
||||||
|
const $btn = this.get_btn(btn);
|
||||||
|
$btn.prop("disabled", false)
|
||||||
|
$btn.hover(() => {
|
||||||
|
$btn.css('cursor','pointer');
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
set_class() {
|
set_class() {
|
||||||
for (const btn in this.add_class) {
|
for (const btn in this.add_class) {
|
||||||
const class_name = this.add_class[btn];
|
const class_name = this.add_class[btn];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user