1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<?php
/**********************************************************************
Copyright (C) FrontAccounting, LLC.
Released under the terms of the GNU General Public License, GPL,
as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_FORMSETUP';
$path_to_root = "..";
include($path_to_root . "/includes/session.inc");
page(_($help_context = "Forms Setup"));
include($path_to_root . "/includes/ui.inc");
//-------------------------------------------------------------------------------------------------
if (isset($_POST['setprefs']))
{
$systypes = get_systypes();
begin_transaction();
while ($type = db_fetch($systypes))
{
save_next_reference($type["type_id"], $_POST['id' . $type["type_id"]]);
}
commit_transaction();
display_notification_centered(_("Forms settings have been updated."));
}
start_form();
start_outer_table($table_style2);
$systypes = get_systypes();
table_section(1);
$th = array(_("Form"), _("Next Reference"));
table_header($th);
$i = 0;
while ($type = db_fetch($systypes))
{
if ($i++ == ST_CUSTCREDIT)
{
table_section(2);
table_header($th);
}
ref_row($systypes_array[$type["type_id"]], 'id' . $type["type_id"], '', $type["next_reference"]);
}
end_outer_table(1);
submit_center('setprefs', _("Update"), true, '', 'default');
end_form(2);
//-------------------------------------------------------------------------------------------------
end_page();
?>
|