Skip to content

Commit

Permalink
fix: add payment hook to point of sale JS (#33988)
Browse files Browse the repository at this point in the history
fix: add payment hook to point of sale JS (#33988)

(cherry picked from commit a0eb5e5)

Co-authored-by: Richard Case <110036763+casesolved-co-uk@users.noreply.github.com>
  • Loading branch information
mergify[bot] and casesolved-co-uk authored Feb 12, 2023
1 parent 679b16e commit 49fd712
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions erpnext/selling/page/point_of_sale/pos_payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ erpnext.PointOfSale.Payment = class {
this.focus_on_default_mop();
}

after_render() {
const frm = this.events.get_frm();
frm.script_manager.trigger("after_payment_render", frm.doc.doctype, frm.doc.docname);
}

edit_cart() {
this.events.toggle_other_sections(false);
this.toggle_component(false);
Expand All @@ -332,6 +337,7 @@ erpnext.PointOfSale.Payment = class {
this.toggle_component(true);

this.render_payment_section();
this.after_render();
}

toggle_remarks_control() {
Expand Down

0 comments on commit 49fd712

Please sign in to comment.