[minor] check mode_of_payment in Payment entry (#9869)
* [minor] don't trigger the expense type trigger if value is not set * [minor] check if account is selected or not in Payment Entry * [minor] check mode_of_payment in Payment entry
This commit is contained in:
parent
394c4d718d
commit
ad7eb9d03c
@ -291,7 +291,7 @@ frappe.ui.form.on('Payment Entry', {
|
||||
|
||||
set_account_currency_and_balance: function(frm, account, currency_field,
|
||||
balance_field, callback_function) {
|
||||
if (frm.doc.posting_date) {
|
||||
if (frm.doc.posting_date && account) {
|
||||
frappe.call({
|
||||
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_account_details",
|
||||
args: {
|
||||
|
@ -27,6 +27,10 @@ erpnext.hr.ExpenseClaimController = frappe.ui.form.Controller.extend({
|
||||
return;
|
||||
}
|
||||
|
||||
if(!d.expense_type) {
|
||||
return;
|
||||
}
|
||||
|
||||
return frappe.call({
|
||||
method: "erpnext.hr.doctype.expense_claim.expense_claim.get_expense_claim_account",
|
||||
args: {
|
||||
|
@ -94,6 +94,10 @@ var get_payment_mode_account = function(frm, mode_of_payment, callback) {
|
||||
frappe.throw(__("Please select the Company first"));
|
||||
}
|
||||
|
||||
if(!mode_of_payment) {
|
||||
return;
|
||||
}
|
||||
|
||||
return frappe.call({
|
||||
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
|
||||
args: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user