fix: Get bank account on selection of payment mode in Loan
This commit is contained in:
parent
ab1c43dbee
commit
b90fc7fc0d
@ -172,18 +172,20 @@ frappe.ui.form.on('Loan', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mode_of_payment: function (frm) {
|
mode_of_payment: function (frm) {
|
||||||
frappe.call({
|
if (frm.doc.mode_of_payment && frm.doc.company) {
|
||||||
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
|
frappe.call({
|
||||||
args: {
|
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
|
||||||
"mode_of_payment": frm.doc.mode_of_payment,
|
args: {
|
||||||
"company": frm.doc.company
|
"mode_of_payment": frm.doc.mode_of_payment,
|
||||||
},
|
"company": frm.doc.company
|
||||||
callback: function (r, rt) {
|
},
|
||||||
if (r.message) {
|
callback: function (r, rt) {
|
||||||
frm.set_value("payment_account", r.message.account);
|
if (r.message) {
|
||||||
|
frm.set_value("payment_account", r.message.account);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
loan_application: function (frm) {
|
loan_application: function (frm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user