[0004212] Work Order Entry: fixed error when voided WO refence is reused.
[fa-stable.git] / admin / forms_setup.php
index b4a8aa28ae50b4fcd2f57d6b88134536c831c975..a2895ab63c6c6bddc08638c74fc7bb0275d6db68 100644 (file)
@@ -1,53 +1,30 @@
 <?php
-
-$page_security =10;
+/**********************************************************************
+    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(_("Forms Setup"));
-
-include($path_to_root . "/includes/ui.inc");
-
-//-------------------------------------------------------------------------------------------------
-
-if (isset($_POST['setprefs'])) 
-{
-
-       $systypes = get_systypes();
 
-       begin_transaction();
+include_once($path_to_root . "/includes/session.inc");
+include_once('../includes/ui/class.reflines_crud.inc');
 
-    while ($type = db_fetch($systypes)) 
-    {
-       save_next_reference($type["type_id"], $_POST['id' . $type["type_id"]]);
-    }
+include_once($path_to_root . "/includes/ui.inc");
 
-    commit_transaction();
-
-       display_notification_centered(_("Forms settings have been updated."));
-}
+page(_($help_context = "Transaction References"));
 
 start_form();
-start_table("class='tablestyle'");
-
-$systypes = get_systypes();
-
-$th = array(_("Form"), _("Next Reference"));
-table_header($th);
-
-while ($type = db_fetch($systypes)) 
-{
-       ref_row(systypes::name($type["type_id"]), 'id' . $type["type_id"], '', $type["next_reference"]);
-}
-
-end_table(1);
-
-submit_center('setprefs', _("Update"), true, '', true);
 
-end_form(2);
+$companies = new fa_reflines();
 
-//-------------------------------------------------------------------------------------------------
+$companies->show();
 
-end_page();
+end_form();
 
-?>
\ No newline at end of file
+end_page();
\ No newline at end of file