fix: Fixed clearing issue of payment references on setting cost center (#26548)

Co-authored-by: Subin Tom <subin-home@Subins-MacBook-Air.local>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
This commit is contained in:
Subin Tom
2021-07-20 21:04:10 +05:30
committed by GitHub
parent c5a0c22352
commit 01f8833bd1

View File

@@ -1041,18 +1041,10 @@ frappe.ui.form.on('Payment Entry', {
},
callback: function(r, rt) {
if(r.message) {
frappe.run_serially([
() => {
frm.set_value("paid_from_account_balance", r.message.paid_from_account_balance);
frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance);
frm.set_value("party_balance", r.message.party_balance);
},
() => {
if(frm.doc.payment_type != "Internal") {
frm.clear_table("references");
}
}
]);
}
}