mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
get query for bank/cash account
This commit is contained in:
@@ -78,14 +78,22 @@ cur_frm.cscript.change_abbr = function() {
|
|||||||
cur_frm.fields_dict.default_bank_account.get_query = function(doc) {
|
cur_frm.fields_dict.default_bank_account.get_query = function(doc) {
|
||||||
return{
|
return{
|
||||||
filters: [
|
filters: [
|
||||||
['Account', 'account_type', 'in', 'Bank, Cash'],
|
['Account', 'account_type', '=', 'Bank'],
|
||||||
['Account', 'group_or_ledger', '=', 'Ledger'],
|
['Account', 'group_or_ledger', '=', 'Ledger'],
|
||||||
['Account', 'company', '=', doc.name]
|
['Account', 'company', '=', doc.name]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.default_cash_account.get_query = cur_frm.fields_dict.default_bank_account.get_query;
|
cur_frm.fields_dict.default_cash_account.get_query = function(doc) {
|
||||||
|
return{
|
||||||
|
filters: [
|
||||||
|
['Account', 'account_type', '=', 'Cash'],
|
||||||
|
['Account', 'group_or_ledger', '=', 'Ledger'],
|
||||||
|
['Account', 'company', '=', doc.name]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.default_receivable_account.get_query = function(doc) {
|
cur_frm.fields_dict.default_receivable_account.get_query = function(doc) {
|
||||||
return{
|
return{
|
||||||
|
|||||||
Reference in New Issue
Block a user