Topic: Sorting of Expense Accounts Alphabetically

Is there a way that one can sort the Expense Accounts Alphabetically instead of Account Numbers?

Wynand

Re: Sorting of Expense Accounts Alphabetically

Where? In the report? Which report?
Will this sort affect groups' child entries?

Re: Sorting of Expense Accounts Alphabetically

In the Profit and Loss report under General Ledger.

It is normally sorted according to the account number instead of the account name. Account name order in the Expenses just makes it easier to find information to complete the company's Tax return.

It is still grouped by the Classes/Groups/Account, depending on your setup.

Wynand

Re: Sorting of Expense Accounts Alphabetically

That will be in reporting/rep707.php.

The relevant code is:

function print_profit_and_loss_statement()

The loop is in line 288 within which the elements will need to be alphabetically arranged:

while ($accounttype=db_fetch($typeresult))

Line 273:

$classresult = get_account_classes(false, 0);

too could be checked out.

The lines 40-41 in function display_type

    $result = get_gl_accounts(null, null, $type);    
    while ($account=db_fetch($result))

may need to be sorted for your needs.

A modified version of the rep707.php could be made into an extension to serve your needs. Anyone game?