mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 00:25:01 +00:00
Merge pull request #44761 from aerele/pos_discount
fix: apply discount on qty change
This commit is contained in:
@@ -315,8 +315,12 @@ erpnext.PointOfSale.ItemDetails = class {
|
||||
frappe.model.on("POS Invoice Item", "*", (fieldname, value, item_row) => {
|
||||
const field_control = this[`${fieldname}_control`];
|
||||
const item_row_is_being_edited = this.compare_with_current_item(item_row);
|
||||
|
||||
if (item_row_is_being_edited && field_control && field_control.get_value() !== value) {
|
||||
if (
|
||||
item_row_is_being_edited &&
|
||||
field_control &&
|
||||
field_control.get_value() !== value &&
|
||||
value == item_row[fieldname]
|
||||
) {
|
||||
field_control.set_value(value);
|
||||
cur_pos.update_cart_html(item_row);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user