Fix install hook returning error
authorMaxime Bourget <bmx007@gmail.com>
Mon, 3 Jun 2013 14:00:44 +0000 (15:00 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Mon, 3 Jun 2013 14:00:44 +0000 (15:00 +0100)
hooks.php
includes/db_order_lines.inc

index fc1943f83324faa2c2faf86655fe816af9a570ab..778ee8eaa63a4f367185f21a159d13dcc89cf21a 100644 (file)
--- a/hooks.php
+++ b/hooks.php
@@ -44,12 +44,10 @@ class hooks_order_line_extra extends hooks {
         global $db_connections;
 
         $updates = array(
         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'),
                                                '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) && update_queue_quantities();
     }
 
         return $this->update_databases($company, $updates, $check_only) && update_queue_quantities();
     }
 
index b3b4409dc6a677f8f4c94ab4f4bc3abe777bbf14..e6a682442aed1323fedba2b9105273b3f91f0be6 100644 (file)
@@ -69,6 +69,7 @@ function update_queue_quantity_for_item($stock_id) {
                        clear_queue_quantity_for_item($stock_id);
                        insert_item_into_queue($stock_id);
                commit_transaction();
                        clear_queue_quantity_for_item($stock_id);
                        insert_item_into_queue($stock_id);
                commit_transaction();
+               return true;
 }
 
 function update_queue_quantities() {
 }
 
 function update_queue_quantities() {
@@ -78,6 +79,7 @@ function update_queue_quantities() {
                $stock_id = $row['stk_code'];
                update_queue_quantity_for_item($stock_id);
        }
                $stock_id = $row['stk_code'];
                update_queue_quantity_for_item($stock_id);
        }
+               return true;
 }
 
 function update_order_detail_priority($detail_id, $priority) {
 }
 
 function update_order_detail_priority($detail_id, $priority) {