[0005213] Additional cleanup.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 28 Sep 2020 17:10:01 +0000 (19:10 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 28 Sep 2020 17:10:01 +0000 (19:10 +0200)
inventory/includes/db/items_adjust_db.inc

index 83c33c4a8adb9c64e006d8d0dfd22b8a40e8b65d..7dc541032cf69ad9e3890fd6d2307e326bdf19cd 100644 (file)
@@ -36,8 +36,8 @@ function add_stock_adjustment($items, $location, $date_, $reference, $memo_)
                if ($SysPrefs->loc_notification() == 1 && $line_item->quantity < 0)
                {
                        $tmp = $line_item->quantity;
                if ($SysPrefs->loc_notification() == 1 && $line_item->quantity < 0)
                {
                        $tmp = $line_item->quantity;
-                       $chg = $line_item; $chg->quantity= -$chg->quantity;     // calculate_reorder_level expect positive qty
-                       $loc = calculate_reorder_level($location, $chg, $st_ids, $st_names, $st_num, $st_reorder); 
+                       $line_item->quantity = -$line_item->quantity;   // calculate_reorder_level expect positive qty
+                       $loc = calculate_reorder_level($location, $line_item, $st_ids, $st_names, $st_num, $st_reorder);
                        $line_item->quantity = $tmp;
                }
 
                        $line_item->quantity = $tmp;
                }