Code fix for Enable/Disable Discount in POS using POS Profile #11748
This commit is contained in:
parent
171e5af995
commit
2c95ab3897
@ -585,6 +585,7 @@ class POSCart {
|
|||||||
this.numpad && this.numpad.reset_value();
|
this.numpad && this.numpad.reset_value();
|
||||||
this.customer_field.set_value("");
|
this.customer_field.set_value("");
|
||||||
|
|
||||||
|
this.$discount_amount.find('input:text').val('');
|
||||||
this.wrapper.find('.grand-total-value').text(
|
this.wrapper.find('.grand-total-value').text(
|
||||||
format_currency(this.frm.doc.grand_total, this.frm.currency));
|
format_currency(this.frm.doc.grand_total, this.frm.currency));
|
||||||
this.wrapper.find('.rounded-total-value').text(
|
this.wrapper.find('.rounded-total-value').text(
|
||||||
@ -716,18 +717,14 @@ class POSCart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disable_numpad_control() {
|
disable_numpad_control() {
|
||||||
if(!this.frm.allow_edit_rate && !this.frm.allow_edit_discount) {
|
let disabled_btns = [];
|
||||||
return ['Rate', 'Disc'];
|
|
||||||
}
|
|
||||||
if(!this.frm.allow_edit_rate || !this.frm.allow_edit_discount) {
|
|
||||||
if(!this.frm.allow_edit_rate) {
|
if(!this.frm.allow_edit_rate) {
|
||||||
return ['Rate'];
|
disabled_btns.push('Rate');
|
||||||
} else {
|
|
||||||
return ['Disc'];
|
|
||||||
}
|
}
|
||||||
} else {
|
if(!this.frm.allow_edit_discount) {
|
||||||
return [];
|
disabled_btns.push('Disc');
|
||||||
}
|
}
|
||||||
|
return disabled_btns;
|
||||||
}
|
}
|
||||||
|
|
||||||
make_numpad() {
|
make_numpad() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user