Old ineffective sql_trail superseded by new improved db_trail logging only calls...
[fa-stable.git] / inventory / includes / db / items_adjust_db.inc
index 0085f98360b7b702b226bccd3421fc836ef3dc86..07137bf246f97593e344837a1de5733c7bb4f8c9 100644 (file)
@@ -14,7 +14,7 @@ function add_stock_adjustment($items, $location, $date_, $reference, $memo_)
 {
        global $SysPrefs, $path_to_root, $Refs;
 
-       begin_transaction();
+       begin_transaction(__FUNCTION__, func_get_args());
        $args = func_get_args();
        $args = (object)array_combine(array('items', 'location', 'date_', 'reference', 'memo_'), $args);
        $args->trans_no = 0;
@@ -61,9 +61,11 @@ function add_stock_adjustment($items, $location, $date_, $reference, $memo_)
 
 function void_stock_adjustment($type_no)
 {
+       begin_transaction(__FUNCTION__, func_get_args());
        hook_db_prevoid(ST_INVADJUST, $type_no);
        void_gl_trans(ST_INVADJUST, $type_no);
        void_stock_move(ST_INVADJUST, $type_no);
+       commit_transaction();
 }
 
 //-------------------------------------------------------------------------------------------------------------