Skip to content

Commit

Permalink
fix: bind this object explicitly on callback event function
Browse files Browse the repository at this point in the history
(cherry picked from commit 5e790a0)
  • Loading branch information
kavin-114 authored and mergify[bot] committed Nov 11, 2024
1 parent f3ee439 commit 3423d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/pos_invoice/pos_invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
super.refresh();

if (doc.docstatus == 1 && !doc.is_return) {
this.frm.add_custom_button(__("Return"), this.make_sales_return, __("Create"));
this.frm.add_custom_button(__("Return"), this.make_sales_return.bind(this), __("Create"));
this.frm.page.set_inner_btn_group_as_primary(__("Create"));
}

Expand Down

0 comments on commit 3423d3c

Please sign in to comment.