Merge pull request #37041 from vorasmit/fix-advances

fix: multiple fixes for booking advances in seperate account
This commit is contained in:
Deepesh Garg
2023-09-13 20:24:57 +05:30
committed by GitHub
8 changed files with 21 additions and 9 deletions

View File

@@ -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"}],

View File

@@ -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

View File

@@ -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