Skip to content

Commit

Permalink
fix: mode of payment has precedance
Browse files Browse the repository at this point in the history
Mode of Payment is given precedence over company/party bank account

(cherry picked from commit 4aef969)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Apr 25, 2024
1 parent 15bb41d commit c6145a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erpnext/accounts/doctype/payment_entry/payment_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,9 @@ frappe.ui.form.on("Payment Entry", {
},
callback: function (r) {
if (r.message) {
frm.set_value(field, r.message.account);
if (!frm.doc.mode_of_payment) {
frm.set_value(field, r.message.account);
}
frm.set_value("bank", r.message.bank);
frm.set_value("bank_account_no", r.message.bank_account_no);
}
Expand Down

0 comments on commit c6145a1

Please sign in to comment.