X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fincludes%2Fdb%2Fitems_transfer_db.inc;h=8448ae8968b71a5bde2598f6c32c724952675201;hb=0c1ab57c09d87eed2bd248892dbfe3f256767a82;hp=0acd090081c006b3cd9324e8af25a23cc8c5b295;hpb=a680034ef46aaf5ab4a062b404fa8d95b6f96ad6;p=fa-stable.git diff --git a/inventory/includes/db/items_transfer_db.inc b/inventory/includes/db/items_transfer_db.inc index 0acd0900..8448ae89 100644 --- a/inventory/includes/db/items_transfer_db.inc +++ b/inventory/includes/db/items_transfer_db.inc @@ -13,7 +13,7 @@ function add_stock_transfer($Items, $location_from, $location_to, $date_, $type, $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_transfer($Items, $location_from, $location_to, $date_, $type, $transfer_id = get_next_trans_no(ST_LOCTRANSFER); - if ($loc_notification == 1) + if ($SysPrefs->loc_notification() == 1) { include_once($path_to_root . "/inventory/includes/inventory_db.inc"); $st_ids = array(); @@ -34,7 +34,7 @@ function add_stock_transfer($Items, $location_from, $location_to, $date_, $type, } foreach ($Items as $line_item) { - if ($loc_notification == 1) + if ($SysPrefs->loc_notification() == 1) $loc = calculate_reorder_level($location_from, $line_item, $st_ids, $st_names, $st_num, $st_reorder); add_stock_transfer_item($transfer_id, $line_item->stock_id, $location_from, $location_to, $date_, $type, $reference, $line_item->quantity); @@ -50,7 +50,7 @@ function add_stock_transfer($Items, $location_from, $location_to, $date_, $type, commit_transaction(); - if ($loc_notification == 1 && count($st_ids) > 0) + if ($SysPrefs->loc_notification() == 1 && count($st_ids) > 0) send_reorder_email($loc, $st_ids, $st_names, $st_num, $st_reorder); return $transfer_id;