Topic: Missing message!

Hi, I posted a message on here yesterday, had a reply from Joe, and sent another reply after. Coming back this evening, the thread has disappeared, and I have had to re-register with the forum. Should I feel persecuted?

Tim

2 (edited by joe 05/30/2007 03:19:43 pm)

Re: Missing message!

Hello Tim,

I guess they are about moving the site and this item didn't come through.
Anyway, your message was about having alphanumeric accounts instead of numeric accounts in the General Ledger.
To everyone out there. This is really not a problem to change. The internal database field is alphanumeric, for sorting purposes, and therefore no changes have to be done to the database.
As I can see, there is only one place to change in /gl/manage/gl_accounts.php,
Line 50-55. Uncomment the lines with // in fromt of the lines like this:

//elseif (!is_numeric($_POST['account_code']))
//{
//    $input_error = 1;
//    display_error( _("The account code must be numeric."));
//}

A generally better solution is to have a global switch for allowing alphanumeric characters in the accounts, e.g. in config.php, that has a default value of 0.

E.g. the variable $accounts_alpha = 0.

Then the lines would look like this:

elseif (!$accounts_alpha && !is_numeric($_POST['account_code']))
{
    $input_error = 1;
    display_error( _("The account code must be numeric."));
}

As you see, if this switch is set to 1, the script will never perform this sentence.

This could be a wish for the next version.

Joe

Re: Missing message!

Joe, Thanks for that, I realised afterwards the post was appearing in the forums at https://frontaccounting.com/wb2/pages/forum.php which is where sourceforge directed me and not here. Its not imprtant, I had already implemented the change you have suggested anyway, and will restrict my future comments to here.

Thanks
Tim