X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=hooks.php;h=fc1943f83324faa2c2faf86655fe816af9a570ab;hb=b31a4ed614cfcee060deb69f53524e4acf1f861d;hp=1f571a56eeaf45f361df163af936d891ff188e5a;hpb=e6d47d438b6862f3fd2640deb43762723023e297;p=order_line_extra.git diff --git a/hooks.php b/hooks.php index 1f571a5..fc1943f 100644 --- a/hooks.php +++ b/hooks.php @@ -6,7 +6,9 @@ // Title: Order Line Extra // Free software under GNU GPL // ---------------------------------------------------------------- -define ('SS_ORDERLINEX', 131<<8); +define ('SS_ORDERLINEX', 100<<8); + +include_once('includes/db_order_lines.inc'); class hooks_order_line_extra extends hooks { var $module_name = 'order_line_extra'; @@ -21,11 +23,17 @@ class hooks_order_line_extra extends hooks { function install_options($app) { global $path_to_root; + switch($app->id) { + case 'orders': + $app->add_rapp_function(0, _('Order Extra'), + $path_to_root.'/modules/order_line_extra/order_lines_view.php', 'SA_SALESTRANSVIEW'); + } } function install_access() { - $security_sections[SS_ORDERLINEX] = _("Order Line eXtra"); + $security_sections[SS_ORDERLINEX] = _("Order Line Extra"); + $security_areas['SA_ORDERLINEX_EDIT'] = array(SS_ORDERLINEX|1, _("Edit lines")); return array($security_areas, $security_sections); } @@ -36,10 +44,13 @@ class hooks_order_line_extra extends hooks { global $db_connections; $updates = array( - 'alter_sales_order_details.sql' => array('sales_order_details', 'required_date') + 'alter_sales_order_details.sql' => array('sales_order_details', 'required_date'), + 'create_denorm_order_details_queue.sql' => array('denorm_order_details_queue'), + ); - return $this->update_databases($company, $updates, $check_only); + //return $this->update_databases($company, $updates, $check_only); + return $this->update_databases($company, $updates, $check_only) && update_queue_quantities(); } function deactivate_extension($company, $check_only=true)