mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
[Minor] Added condition for get_bank_cash_account (#15112)
This commit is contained in:
committed by
Nabin Hait
parent
8356d4b892
commit
a0b846fb88
@@ -71,19 +71,22 @@ frappe.ui.form.on('Employee 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
employee_loan_application: function (frm) {
|
employee_loan_application: function (frm) {
|
||||||
|
|||||||
Reference in New Issue
Block a user