-
- add_comments(systypes::location_transfer(), $transfer_id, $date_, $memo_);
-
- add_forms_for_sys_type(systypes::location_transfer(), $transfer_id, $location_from, $location_to);
-
- references::save_last($reference, systypes::location_transfer());
-
+ foreach ($Items as $line_item)
+ {
+ 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_, $reference, $line_item->quantity);
+ }
+
+ add_comments(ST_LOCTRANSFER, $transfer_id, $date_, $memo_);
+
+ $Refs->save(ST_LOCTRANSFER, $transfer_id, $reference);
+ add_audit_trail(ST_LOCTRANSFER, $transfer_id, $date_);
+
+ $args->trans_no = $transfer_id;
+ hook_db_postwrite($args, ST_LOCTRANSFER);
+