X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fincludes%2Fdb%2Fitems_adjust_db.inc;h=83c33c4a8adb9c64e006d8d0dfd22b8a40e8b65d;hb=c82b50895aad2e028092a3b362783149f81d8906;hp=9a45e0f7d02c077a10157a07d1e0a8ca7c02b33f;hpb=e330ef6dc0633b6858d7b1f0016299d0f65e04b0;p=fa-stable.git diff --git a/inventory/includes/db/items_adjust_db.inc b/inventory/includes/db/items_adjust_db.inc index 9a45e0f7..83c33c4a 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) { + $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 = $tmp; } add_stock_adjustment_item($adj_id, $line_item->stock_id, $location, $date_, $reference,