Skip to content

Commit

Permalink
Merge pull request #43186 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-43171

fix: set `party_type` null when `payment_type` is changed to `Internal Transfer` (backport #43171)
  • Loading branch information
sagarvora authored Sep 12, 2024
2 parents 28607f0 + 45ff8fa commit 4df38d3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion erpnext/accounts/doctype/payment_entry/payment_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,15 @@ frappe.ui.form.on("Payment Entry", {
payment_type: function (frm) {
if (frm.doc.payment_type == "Internal Transfer") {
$.each(
["party", "party_balance", "paid_from", "paid_to", "references", "total_allocated_amount"],
[
"party",
"party_type",
"party_balance",
"paid_from",
"paid_to",
"references",
"total_allocated_amount",
],
function (i, field) {
frm.set_value(field, null);
}
Expand Down

0 comments on commit 4df38d3

Please sign in to comment.