$path_to_root = "../..";
include($path_to_root . "/includes/session.inc");
-page(_($help_context = "Chart of Accounts"));
+$js = "";
+if ($SysPrefs->use_popup_windows && $SysPrefs->use_popup_search)
+ $js .= get_js_open_window(900, 500);
+
+page(_($help_context = "Chart of Accounts"), false, false, "", $js);
include($path_to_root . "/includes/ui.inc");
include($path_to_root . "/gl/includes/gl_db.inc");
display_error( _("The account name cannot be empty."));
set_focus('account_name');
}
- elseif (!$accounts_alpha && !is_numeric($_POST['account_code']))
+ elseif (!$SysPrefs->accounts_alpha() && !preg_match("/^[0-9.]+$/",$_POST['account_code'])) // we only allow 0-9 and a dot
{
$input_error = 1;
display_error( _("The account code must be numeric."));
}
if ($input_error != 1)
{
- if ($accounts_alpha == 2)
+ if ($SysPrefs->accounts_alpha() == 2)
$_POST['account_code'] = strtoupper($_POST['account_code']);
if (!isset($_POST['account_tags']))
end_page();
-?>