[fixed] Disocunt amount not working for POS
This commit is contained in:
parent
45d45f4247
commit
87e994e0a2
@ -21,7 +21,9 @@ frappe.pages['point-of-sale'].on_page_load = function(wrapper) {
|
||||
};
|
||||
|
||||
frappe.pages['point-of-sale'].refresh = function(wrapper) {
|
||||
cur_frm = wrapper.pos.frm;
|
||||
if (wrapper.pos) {
|
||||
cur_frm = wrapper.pos.frm;
|
||||
}
|
||||
}
|
||||
|
||||
erpnext.pos.PointOfSale = class PointOfSale {
|
||||
@ -742,7 +744,7 @@ class POSCart {
|
||||
|
||||
this.wrapper.find('.discount_amount').on('change', (e) => {
|
||||
frappe.model.set_value(this.frm.doctype, this.frm.docname,
|
||||
'discount_amount', e.target.value);
|
||||
'discount_amount', flt(e.target.value));
|
||||
this.frm.trigger('discount_amount')
|
||||
.then(() => {
|
||||
let discount_wrapper = this.wrapper.find('.additional_discount_percentage');
|
||||
|
@ -31,7 +31,7 @@ def get_items(start, page_length, price_list, item_group, search_value=""):
|
||||
ON
|
||||
(item_det.item_code=i.name or item_det.item_code=i.variant_of)
|
||||
where
|
||||
i.disabled = 0 and i.has_variants = 0
|
||||
i.disabled = 0 and i.has_variants = 0 and i.is_sales_item = 1
|
||||
and i.item_group in (select name from `tabItem Group` where lft >= {lft} and rgt <= {rgt})
|
||||
and (i.item_code like %(item_code)s
|
||||
or i.item_name like %(item_code)s or i.barcode like %(item_code)s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user