X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fincludes%2Fdb%2Fitems_adjust_db.inc;h=7dc541032cf69ad9e3890fd6d2307e326bdf19cd;hb=dab9179f6d090c402dc4bf926cfd62a7879032bc;hp=9a45e0f7d02c077a10157a07d1e0a8ca7c02b33f;hpb=f5b7842870b13bc956b7b9613aa4f937407fc0b1;p=fa-stable.git diff --git a/inventory/includes/db/items_adjust_db.inc b/inventory/includes/db/items_adjust_db.inc index 9a45e0f7..7dc54103 100644 --- a/inventory/includes/db/items_adjust_db.inc +++ b/inventory/includes/db/items_adjust_db.inc @@ -35,8 +35,10 @@ function add_stock_adjustment($items, $location, $date_, $reference, $memo_) if ($SysPrefs->loc_notification() == 1 && $line_item->quantity < 0) { - $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); + $tmp = $line_item->quantity; + $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; } add_stock_adjustment_item($adj_id, $line_item->stock_id, $location, $date_, $reference,