1 (edited by wyxa 05/10/2011 09:59:18 am)

Topic: Bank Accounts table empty

Hello!

When I go to "Bank accounts", the table with the headlines
Account Name Type Currency GL Account Bank Number Bank Address Dflt" is empty.

However, when I check the database for the 0_bank_accounts table, they are there.

In the code (bank_accounts.php, line 97)
$result = get_bank_accounts(check_value('show_inactive'));
returns empty set.

I checked that function, the sql query looks ok.
I'm using FrontAccounting 2.3.2.
Please help me to resolve this issue.
Thank you!

P.S. Hey, check using double quotes in the posting message in this forum...
It is just removed the whole part of my message when I posted it

Re: Bank Accounts table empty

Hi Wyxa
Sounds a bit obvious I know: are you sure you're in company 0?

3 (edited by wyxa 05/12/2011 02:07:11 pm)

Re: Bank Accounts table empty

Hi!
Well, there is no any other company... Only one.
By the way when I check "Bank Account Inquiry", there are all the bank accounts in the dropdown list...

So, "GL->Bank Accounts" - empty, "GL->Bank Account Inquiry" - accounts are present in dropdown list.

Is it a bug or there is some configuration involved?

P.S. Again only half of the message appeared after I posted it... Again it cuts after double quote "
I hope admins will fix this soon. I have to edit my message again.

Re: Bank Accounts table empty

Seems this is is some application issue. Please read FAQ to find how to enable bugtracking featuires in FA.
BTW There is 2.3.3 version available. You should upgrade your FA installation asap, to avoid a couple of  problems fixed by this release.
Janusz

5 (edited by wyxa 05/26/2011 06:35:57 am)

Re: Bank Accounts table empty

Hello there again!

I checked the sql query which is generated by get_bank_accounts function.

SELECT account.*, gl_account.account_name
        FROM &TB_PREF&bank_accounts account, &TB_PREF&chart_master gl_account
        WHERE account.account_code = gl_account.account_code AND !account.inactive ORDER BY account_code, bank_curr_code

As you can see, &TB_PREF& is wrong here. So how to fix it?

I have fixed it temporarily but putting 0_ as prefix, but that's wrong way to do. Please help me.

Re: Bank Accounts table empty

current_user.inc states:
if (!defined('TB_PREF')) {
    define('TB_PREF', '&TB_PREF&');
}

7 (edited by wyxa 05/26/2011 07:03:12 am)

Re: Bank Accounts table empty

Oops, I was wrong, it seems that it's not fixed...

I think I understand what the following query does:

SELECT account.*, gl_account.account_name 
        FROM 0_bank_accounts account, 0_chart_master gl_account 
        WHERE account.account_code = gl_account.account_code AND !account.inactive ORDER BY account_code, bank_curr_code

But it returns empty set, when I try it on db myself.[/strike]

Update:
OK, the 0_chart_master table is empty. This is the problem... Hm...

When I add new bank account, it says "New bank account has been added", but there is nothing in 0_chart_master table

How to fix this?

Re: Bank Accounts table empty

Oh, yes. You have deleted all ledgers accounts. Well, I think it is not good idea. FA has a l lot of internal dependences, so I would rather advice to load any available chart of accounts and customize it to our requirements using menu options provided by the application.
Do not use backdoor tools like phpmyadmin for this unless you are sure you know what you are doing. This is just waste of time.
Janusz