$js .= get_js_open_window(800, 500);
if (user_use_date_picker())
$js .= get_js_date_picker();
-page(_($help_context = "Inventory Location Transfers"), false, false, "", $js);
+
+if (isset($_GET['NewTransfer'])) {
+ if (isset($_GET['FixedAsset'])) {
+ $page_security = 'SA_ASSETTRANSFER';
+ $_SESSION['page_title'] = _($help_context = "Fixed Assets Location Transfers");
+ }
+ else {
+ $_SESSION['page_title'] = _($help_context = "Inventory Location Transfers");
+ }
+}
+page($_SESSION['page_title'], false, false, "", $js);
//-----------------------------------------------------------------------------------------------
display_notification_centered(_("Inventory transfer has been processed"));
display_note(get_trans_view_str($trans_type, $trans_no, _("&View this transfer")));
- hyperlink_no_params($_SERVER['PHP_SELF'], _("Enter &Another Inventory Transfer"));
+ $itm = db_fetch(get_stock_transfer_items($_GET['AddedID']));
+
+ if (is_fixed_asset($itm['mb_flag']))
+ hyperlink_params($_SERVER['PHP_SELF'], _("Enter &Another Fixed Assets Transfer"), "NewTransfer=1&FixedAsset=1");
+ else
+ hyperlink_params($_SERVER['PHP_SELF'], _("Enter &Another Inventory Transfer"), "NewTransfer=1");
display_footer_exit();
}
}
$_SESSION['transfer_items'] = new items_cart(ST_LOCTRANSFER);
+ $_SESSION['transfer_items']->fixed_asset = isset($_GET['FixedAsset']);
$_POST['AdjDate'] = new_doc_date();
if (!is_date_in_fiscalyear($_POST['AdjDate']))
$_POST['AdjDate'] = end_fiscalyear();
if (!isset($_POST['std_cost']))
$_POST['std_cost'] = 0;
add_to_order($_SESSION['transfer_items'], $_POST['stock_id'], input_num('qty'), $_POST['std_cost']);
+ unset($_POST['stock_id']);
line_start_focus();
}
if (isset($_GET['NewTransfer']) || !isset($_SESSION['transfer_items']))
{
+ if (isset($_GET['fixed_asset']))
+ check_db_has_disposable_fixed_assets(_("There are no fixed assets defined in the system."));
+ else
+ check_db_has_costable_items(_("There are no inventory items defined in the system (Purchased or manufactured items)."));
+
handle_new_order();
}