Skip to content

Commit

Permalink
Merge pull request #41208 from ruthra-kumar/incorrect_receivable_acco…
Browse files Browse the repository at this point in the history
…unt_handling_on_reconciliation_tool

fix: set receivable account based on response type
  • Loading branch information
ruthra-kumar committed Apr 26, 2024
2 parents 44f9059 + 066859c commit 41695e6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,12 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo
},
callback: (r) => {
if (!r.exc && r.message) {
this.frm.set_value("receivable_payable_account", r.message[0]);
this.frm.set_value("default_advance_account", r.message[1]);
if (typeof r.message === "string") {
this.frm.set_value("receivable_payable_account", r.message);
} else if (Array.isArray(r.message)) {
this.frm.set_value("receivable_payable_account", r.message[0]);
this.frm.set_value("default_advance_account", r.message[1]);
}
}
this.frm.refresh();
},
Expand Down

0 comments on commit 41695e6

Please sign in to comment.