2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 $page_security = 'SA_FORMSETUP';
14 include($path_to_root . "/includes/session.inc");
16 page(_($help_context = "Forms Setup"));
18 include($path_to_root . "/includes/ui.inc");
20 //-------------------------------------------------------------------------------------------------
22 if (isset($_POST['setprefs']))
25 $systypes = get_systypes();
29 while ($type = db_fetch($systypes))
31 save_next_reference($type["type_id"], $_POST['id' . $type["type_id"]]);
36 display_notification_centered(_("Forms settings have been updated."));
41 start_outer_table(TABLESTYLE2);
43 $systypes = get_systypes();
46 $th = array(_("Form"), _("Next Reference"));
49 while ($type = db_fetch($systypes))
51 if ($i++ == ST_CUSTCREDIT)
56 ref_row($systypes_array[$type["type_id"]], 'id' . $type["type_id"], '', $type["next_reference"]);
61 submit_center('setprefs', _("Update"), true, '', 'default');
65 //-------------------------------------------------------------------------------------------------