foreach ($items as $line_item)
{
- if ($SysPrefs->loc_notification() == 1 && $line_item->qty < 0)
+ if ($SysPrefs->loc_notification() == 1 && $line_item->quantity < 0)
{
- $chg = $line; $chg->qty = -$chg->qty; // calculate_reorder_level expect positive qty
- $loc = calculate_reorder_level($location, $line_item, $st_ids, $st_names, $st_num, $st_reorder);
+ $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);
}
add_stock_adjustment_item($adj_id, $line_item->stock_id, $location, $date_, $reference,