X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fincludes%2Fdb%2Fitems_adjust_db.inc;h=57c4b33c40b3133c5b6d3f3ff00940b90d4b18da;hb=0c1ab57c09d87eed2bd248892dbfe3f256767a82;hp=6e95c2574fe781978a9cdcf6dc700bf639b0bf92;hpb=a680034ef46aaf5ab4a062b404fa8d95b6f96ad6;p=fa-stable.git diff --git a/inventory/includes/db/items_adjust_db.inc b/inventory/includes/db/items_adjust_db.inc index 6e95c257..57c4b33c 100644 --- a/inventory/includes/db/items_adjust_db.inc +++ b/inventory/includes/db/items_adjust_db.inc @@ -13,7 +13,7 @@ function add_stock_adjustment($items, $location, $date_, $type, $increase, $reference, $memo_) { - global $loc_notification, $path_to_root, $Refs; + global $SysPrefs, $path_to_root, $Refs; begin_transaction(); $args = func_get_args(); @@ -24,7 +24,7 @@ function add_stock_adjustment($items, $location, $date_, $type, $increase, $refe $adj_id = get_next_trans_no(ST_INVADJUST); - if ($loc_notification == 1 && !$increase) + if ($SysPrefs->loc_notification() == 1 && !$increase) { include_once($path_to_root . "/inventory/includes/inventory_db.inc"); $st_ids = array(); @@ -35,7 +35,7 @@ function add_stock_adjustment($items, $location, $date_, $type, $increase, $refe foreach ($items as $line_item) { - if ($loc_notification == 1 && !$increase) + if ($SysPrefs->loc_notification() == 1 && !$increase) $loc = calculate_reorder_level($location, $line_item, $st_ids, $st_names, $st_num, $st_reorder); if (!$increase) @@ -53,7 +53,7 @@ function add_stock_adjustment($items, $location, $date_, $type, $increase, $refe $args->trans_no = $adj_id; hook_db_postwrite($args, ST_INVADJUST); commit_transaction(); - if ($loc_notification == 1 && !$increase && count($st_ids) > 0) + if ($SysPrefs->loc_notification() == 1 && !$increase && count($st_ids) > 0) send_reorder_email($loc, $st_ids, $st_names, $st_num, $st_reorder); return $adj_id;