From: Janusz Dobrowolski Date: Mon, 28 Sep 2020 17:10:01 +0000 (+0200) Subject: [0005213] Additional cleanup. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=dab9179f6d090c402dc4bf926cfd62a7879032bc [0005213] Additional cleanup. --- diff --git a/inventory/includes/db/items_adjust_db.inc b/inventory/includes/db/items_adjust_db.inc index 83c33c4a..7dc54103 100644 --- a/inventory/includes/db/items_adjust_db.inc +++ b/inventory/includes/db/items_adjust_db.inc @@ -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; - $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; }