! -> Note
$ -> Affected files
+30-Jan-2008 Janusz Dobrowolski
+ # Minor display fix in tax_types.php
+ $ /taxes/tax_types.php
+ ! Format cleanup on some files.
+ $ /gl/includes/gl_db.inc
+ /gl/includes/gl_ui.inc
+ /applications/application.php
+ frontaccounting.php
+ index.php
+
-------------------- 1.16 Stable Released ----------------------
28-Jan-2008 Joe Hunt
+ Added a possibility to replace the normal listboxes for items, customer and/or suppliers with a search box.
-<?php\r
-\r
- class menu_item \r
- {\r
- var $label;\r
- var $link;\r
- \r
- function menu_item($label, $link) \r
- {\r
- $this->label = $label;\r
- $this->link = $link;\r
- }\r
- }\r
-\r
- class menu \r
- {\r
- var $title;\r
- var $items;\r
- \r
- function menu($title) \r
- {\r
- $this->title = $title;\r
- $this->items = array();\r
- }\r
- \r
- function add_item($label, $link) \r
- {\r
- $item = new menu_item($label,$link);\r
- array_push($this->items,$item);\r
- return $item;\r
- }\r
- \r
- }\r
-\r
- class app_function \r
- {\r
- var $label;\r
- var $link;\r
- var $access;\r
- \r
- function app_function($label,$link,$access=1) \r
- {\r
- $this->label = $label;\r
- $this->link = $link;\r
- $this->access = $access;\r
- }\r
- }\r
-\r
- class module \r
- {\r
- var $name;\r
- var $icon;\r
- var $lappfunctions;\r
- var $rappfunctions;\r
- \r
- function module($name,$icon = null) \r
- {\r
- $this->name = $name;\r
- $this->icon = $icon;\r
- $this->lappfunctions = array();\r
- $this->rappfunctions = array();\r
- }\r
- \r
- function add_lapp_function($label,$link="",$access=1) \r
- {\r
- $appfunction = new app_function($label,$link,$access);\r
- //array_push($this->lappfunctions,$appfunction);\r
- $this->lappfunctions[] = $appfunction;\r
- return $appfunction;\r
- }\r
-\r
- function add_rapp_function($label,$link="",$access=1) \r
- {\r
- $appfunction = new app_function($label,$link,$access);\r
- //array_push($this->rappfunctions,$appfunction);\r
- $this->rappfunctions[] = $appfunction;\r
- return $appfunction;\r
- }\r
- \r
- \r
- }\r
-\r
- class application \r
- {\r
- var $id;\r
- var $name;\r
- var $modules;\r
- var $enabled;\r
- \r
- function application($id, $name, $enabled=true) \r
- {\r
- $this->id = $id;\r
- $this->name = $name;\r
- $this->enables = $enabled;\r
- $this->modules = array();\r
- }\r
- \r
- function add_module($name, $icon = null) \r
- {\r
- $module = new module($name,$icon);\r
- //array_push($this->modules,$module);\r
- $this->modules[] = $module;\r
- return $module;\r
- }\r
- \r
- function add_lapp_function($level, $label,$link="",$access=1) \r
- {\r
- $this->modules[$level]->lappfunctions[] = new app_function($label, $link, $access);\r
- } \r
- \r
- function add_rapp_function($level, $label,$link="",$access=1) \r
- {\r
- $this->modules[$level]->rappfunctions[] = new app_function($label, $link, $access);\r
- } \r
- }\r
-\r
-\r
+<?php
+
+ class menu_item
+ {
+ var $label;
+ var $link;
+
+ function menu_item($label, $link)
+ {
+ $this->label = $label;
+ $this->link = $link;
+ }
+ }
+
+ class menu
+ {
+ var $title;
+ var $items;
+
+ function menu($title)
+ {
+ $this->title = $title;
+ $this->items = array();
+ }
+
+ function add_item($label, $link)
+ {
+ $item = new menu_item($label,$link);
+ array_push($this->items,$item);
+ return $item;
+ }
+
+ }
+
+ class app_function
+ {
+ var $label;
+ var $link;
+ var $access;
+
+ function app_function($label,$link,$access=1)
+ {
+ $this->label = $label;
+ $this->link = $link;
+ $this->access = $access;
+ }
+ }
+
+ class module
+ {
+ var $name;
+ var $icon;
+ var $lappfunctions;
+ var $rappfunctions;
+
+ function module($name,$icon = null)
+ {
+ $this->name = $name;
+ $this->icon = $icon;
+ $this->lappfunctions = array();
+ $this->rappfunctions = array();
+ }
+
+ function add_lapp_function($label,$link="",$access=1)
+ {
+ $appfunction = new app_function($label,$link,$access);
+ //array_push($this->lappfunctions,$appfunction);
+ $this->lappfunctions[] = $appfunction;
+ return $appfunction;
+ }
+
+ function add_rapp_function($label,$link="",$access=1)
+ {
+ $appfunction = new app_function($label,$link,$access);
+ //array_push($this->rappfunctions,$appfunction);
+ $this->rappfunctions[] = $appfunction;
+ return $appfunction;
+ }
+
+
+ }
+
+ class application
+ {
+ var $id;
+ var $name;
+ var $modules;
+ var $enabled;
+
+ function application($id, $name, $enabled=true)
+ {
+ $this->id = $id;
+ $this->name = $name;
+ $this->enables = $enabled;
+ $this->modules = array();
+ }
+
+ function add_module($name, $icon = null)
+ {
+ $module = new module($name,$icon);
+ //array_push($this->modules,$module);
+ $this->modules[] = $module;
+ return $module;
+ }
+
+ function add_lapp_function($level, $label,$link="",$access=1)
+ {
+ $this->modules[$level]->lappfunctions[] = new app_function($label, $link, $access);
+ }
+
+ function add_rapp_function($level, $label,$link="",$access=1)
+ {
+ $this->modules[$level]->rappfunctions[] = new app_function($label, $link, $access);
+ }
+ }
+
+
?>
\ No newline at end of file
-<?php\r
- include_once('applications/application.php');\r
- include_once('applications/customers.php');\r
- include_once('applications/suppliers.php');\r
- include_once('applications/inventory.php');\r
- include_once('applications/manufacturing.php');\r
- include_once('applications/dimensions.php');\r
- include_once('applications/generalledger.php');\r
- include_once('applications/setup.php');\r
- include_once('themes/default/renderer.php');\r
- $path_to_root=".";\r
- include_once($path_to_root . "/includes/session.inc");\r
+<?php
+ include_once('applications/application.php');
+ include_once('applications/customers.php');
+ include_once('applications/suppliers.php');
+ include_once('applications/inventory.php');
+ include_once('applications/manufacturing.php');
+ include_once('applications/dimensions.php');
+ include_once('applications/generalledger.php');
+ include_once('applications/setup.php');
+ include_once('themes/default/renderer.php');
+ $path_to_root=".";
+ include_once($path_to_root . "/includes/session.inc");
- class front_accounting \r {\r var $user;\r
- var $settings;\r
- var $applications;\r
- var $selected_application;\r
- // GUI\r
- var $menu;\r
- var $renderer;\r
- function front_accounting() \r {\r $this->renderer = new renderer();\r }\r
- function add_application($app) \r {\r $this->applications[$app->id] = &$app;\r }\r
- function get_application($id) \r {\r if (isset($this->applications[$id]))\r
- return $this->applications[$id];\r
- return null;\r }\r
- function get_selected_application() \r {\r if (isset($this->selected_application))\r
- return $this->applications[$this->selected_application];\r
- foreach ($this->applications as $application)\r
- return $application;\r
- return null;\r }\r
- function display() \r {\r $this->init();\r
- $this->renderer->wa_header();\r
- $this->renderer->menu_header($this->menu);\r
- $this->renderer->display_applications($this);\r
- $this->renderer->menu_footer($this->menu);\r
- $this->renderer->wa_footer();\r }\r
- function init() \r {\r
- $this->menu = new menu(_("Main Menu"));\r
- $this->menu->add_item(_("Main Menu"), "index.php");\r
- $this->menu->add_item(_("Logout"), "/account/access/logout.php");\r
- $this->applications = array();\r
- $this->add_application(new customers_app());\r
- $this->add_application(new suppliers_app());\r
- $this->add_application(new inventory_app());\r
- $this->add_application(new manufacturing_app());\r
- $this->add_application(new dimensions_app());\r
- $this->add_application(new general_ledger_app());\r
- $this->add_application(new setup_app());\r }\r }\r
+ class front_accounting
+ {
+ var $user;
+ var $settings;
+ var $applications;
+ var $selected_application;
+ // GUI
+ var $menu;
+ var $renderer;
+ function front_accounting()
+ {
+ $this->renderer = new renderer();
+ }
+ function add_application($app)
+ {
+ $this->applications[$app->id] = &$app;
+ }
+ function get_application($id)
+ {
+ if (isset($this->applications[$id]))
+ return $this->applications[$id];
+ return null;
+ }
+ function get_selected_application()
+ {
+ if (isset($this->selected_application))
+ return $this->applications[$this->selected_application];
+ foreach ($this->applications as $application)
+ return $application;
+ return null;
+ }
+ function display()
+ {
+ $this->init();
+ $this->renderer->wa_header();
+ $this->renderer->menu_header($this->menu);
+ $this->renderer->display_applications($this);
+ $this->renderer->menu_footer($this->menu);
+ $this->renderer->wa_footer();
+ }
+ function init()
+ {
+ $this->menu = new menu(_("Main Menu"));
+ $this->menu->add_item(_("Main Menu"), "index.php");
+ $this->menu->add_item(_("Logout"), "/account/access/logout.php");
+ $this->applications = array();
+ $this->add_application(new customers_app());
+ $this->add_application(new suppliers_app());
+ $this->add_application(new inventory_app());
+ $this->add_application(new manufacturing_app());
+ $this->add_application(new dimensions_app());
+ $this->add_application(new general_ledger_app());
+ $this->add_application(new setup_app());
+ }
+}
?>
\ No newline at end of file
-<?php\r
-\r
-include_once($path_to_root . "/includes/banking.inc");\r
-\r
-include_once($path_to_root . "/gl/includes/db/gl_db_trans.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_bank_trans.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_banking.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_bank_accounts.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_currencies.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_rates.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_accounts.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_account_types.inc");\r
-include_once($path_to_root . "/gl/includes/db/gl_db_bank_trans_types.inc");\r
-\r
-//--------------------------------------------------------------------------------\r
-\r
-\r
- \r
-\r
+<?php
+
+include_once($path_to_root . "/includes/banking.inc");
+
+include_once($path_to_root . "/gl/includes/db/gl_db_trans.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_bank_trans.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_banking.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_bank_accounts.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_currencies.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_rates.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_accounts.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_account_types.inc");
+include_once($path_to_root . "/gl/includes/db/gl_db_bank_trans_types.inc");
+
+//--------------------------------------------------------------------------------
+
+
+
+
?>
\ No newline at end of file
-<?php\r
-\r
-include_once($path_to_root . "/includes/ui.inc");\r
-\r
+<?php
+
+include_once($path_to_root . "/includes/ui.inc");
+
?>
\ No newline at end of file
-<?php\r
- $path_to_root=".";\r\r $page_security = 1;\r
- include_once("frontaccounting.php");\r
- include_once("includes/session.inc");\r
- if (!isset($_SESSION["App"]))\r
- $_SESSION["App"] = new front_accounting();\r
- $app = &$_SESSION["App"];\r
- if (isset($_GET['application']))\r
- $app->selected_application = $_GET['application'];\r
- $app->display();\r
+<?php
+ $path_to_root=".";
+
+ $page_security = 1;
+ include_once("frontaccounting.php");
+ include_once("includes/session.inc");
+ if (!isset($_SESSION["App"]))
+ $_SESSION["App"] = new front_accounting();
+ $app = &$_SESSION["App"];
+ if (isset($_GET['application']))
+ $app->selected_application = $_GET['application'];
+ $app->display();
?>
\ No newline at end of file
label_cell($myrow["name"]);
label_cell(number_format2($myrow["rate"],user_percent_dec()), "align=right");
- label_cell($myrow["sales_gl_code"] . " " . $myrow["SalesAccountName"]);
- label_cell($myrow["purchasing_gl_code"] . " " . $myrow["PurchasingAccountName"]);
+ label_cell($myrow["sales_gl_code"] . " " . $myrow["SalesAccountName"]);
+ label_cell($myrow["purchasing_gl_code"] . " " . $myrow["PurchasingAccountName"]);
label_cell($out);
edit_link_cell("selected_id=".$myrow["id"]);