fix: correct set_query filters
This commit is contained in:
parent
c47adcfdd9
commit
43061f4416
@ -24,7 +24,8 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo
|
||||
filters: {
|
||||
"company": this.frm.doc.company,
|
||||
"is_group": 0,
|
||||
"account_type": frappe.boot.party_account_types[this.frm.doc.party_type]
|
||||
"account_type": frappe.boot.party_account_types[this.frm.doc.party_type],
|
||||
"root_type": this.frm.doc.party_type == 'Customer' ? "Asset" : "Liability"
|
||||
}
|
||||
};
|
||||
});
|
||||
|
@ -12,6 +12,7 @@ frappe.ui.form.on("Supplier", {
|
||||
return {
|
||||
filters: {
|
||||
'account_type': 'Payable',
|
||||
'root_type': 'Liability',
|
||||
'company': d.company,
|
||||
"is_group": 0
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ frappe.ui.form.on("Customer", {
|
||||
let d = locals[cdt][cdn];
|
||||
let filters = {
|
||||
'account_type': 'Receivable',
|
||||
'root_type': 'Asset',
|
||||
'company': d.company,
|
||||
"is_group": 0
|
||||
};
|
||||
|
@ -200,8 +200,8 @@ erpnext.company.setup_queries = function(frm) {
|
||||
$.each([
|
||||
["default_bank_account", {"account_type": "Bank"}],
|
||||
["default_cash_account", {"account_type": "Cash"}],
|
||||
["default_receivable_account", {"account_type": "Receivable"}],
|
||||
["default_payable_account", {"account_type": "Payable"}],
|
||||
["default_receivable_account", { "root_type": "Asset", "account_type": "Receivable" }],
|
||||
["default_payable_account", { "root_type": "Liability", "account_type": "Payable" }],
|
||||
["default_expense_account", {"root_type": "Expense"}],
|
||||
["default_income_account", {"root_type": "Income"}],
|
||||
["round_off_account", {"root_type": "Expense"}],
|
||||
|
@ -30,6 +30,7 @@ frappe.ui.form.on("Customer Group", {
|
||||
frm.set_query('account', 'accounts', function (doc, cdt, cdn) {
|
||||
return {
|
||||
filters: {
|
||||
'root_type': 'Asset',
|
||||
"account_type": 'Receivable',
|
||||
"company": locals[cdt][cdn].company,
|
||||
"is_group": 0
|
||||
|
@ -30,6 +30,7 @@ frappe.ui.form.on("Supplier Group", {
|
||||
frm.set_query('account', 'accounts', function (doc, cdt, cdn) {
|
||||
return {
|
||||
filters: {
|
||||
'root_type': 'Liability',
|
||||
'account_type': 'Payable',
|
||||
'company': locals[cdt][cdn].company,
|
||||
"is_group": 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user