Fixes #12810
This commit is contained in:
parent
b553b7a69d
commit
056c1709c6
@ -768,12 +768,20 @@ class POSCart {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.selected_item.active_field == 'discount_percentage' && this.numpad.get_value() > cint(100)) {
|
||||||
|
frappe.show_alert({
|
||||||
|
indicator: 'red',
|
||||||
|
message: __('Discount amount cannot be greater than 100%')
|
||||||
|
});
|
||||||
|
this.numpad.reset_value();
|
||||||
|
} else {
|
||||||
const item_code = this.selected_item.attr('data-item-code');
|
const item_code = this.selected_item.attr('data-item-code');
|
||||||
const field = this.selected_item.active_field;
|
const field = this.selected_item.active_field;
|
||||||
const value = this.numpad.get_value();
|
const value = this.numpad.get_value();
|
||||||
|
|
||||||
this.events.on_field_change(item_code, field, value);
|
this.events.on_field_change(item_code, field, value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.events.on_numpad(btn_value);
|
this.events.on_numpad(btn_value);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user