<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_TRANSPORT_TRANSVIEW';
$path_to_root = "../..";

include_once($path_to_root . "/includes/session.inc");

include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/inventory.inc");
include_once($path_to_root . "/includes/data_checks.inc");

include_once($path_to_root . "/transport/includes/db/vehicle_requests_db.inc");
include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
$js = "";
if ($SysPrefs->use_popup_windows)
	$js .= get_js_open_window(800, 500);
page(_($help_context = "View Work Order"), true, false, "", $js);

//-------------------------------------------------------------------------------------------------
$woid = 0;
if ($_GET['trans_no'] != "")
{
	$vehi_req_id = $_GET['trans_no'];
}

global $approval_statuses;

display_heading("Vehicle Request No: " . $vehi_req_id);
br();
$myrow = view_vehicle_request_details($vehi_req_id);

start_table(TABLESTYLE2, "width=90%");

start_row();

label_cells(_("Vehicle Req. No."), $myrow['id'], "class='tableheader2'");
end_row();
label_cells(_("Department"), $myrow['department'], "class='tableheader2'");
end_row();
label_cells(_("Project"), $myrow['project'], "class='tableheader2'");
end_row();
label_cells(_("Task"), $myrow['task'], "class='tableheader2'");
end_row();
label_cells(_("From Date Time"), $myrow['from_date_time'], "class='tableheader2'");
end_row();
label_cells(_("To Date Time"), $myrow['to_date_time'], "class='tableheader2'");
end_row();
label_cells(_("Vehicle Package"), $myrow['vahicle_package'], "class='tableheader2'");
end_row();
label_cells(_("Cost"), number_format($myrow['amount'],2), "class='tableheader2'");
end_row(); 


label_cells(_("Passengers"), $myrow['passengers'], "class='tableheader2'");
end_row();
label_cells(_("Route"), $myrow['route'], "class='tableheader2'");
end_row();
label_cells(_("Vehicle"), $myrow['vehicle_description'], "class='tableheader2'");
end_row();
label_cells(_("Comment"), $myrow['comment'], "class='tableheader2'");
end_row();

label_cells(_("Requested By"), $myrow['requestor_name'], "class='tableheader2'");
end_row();
label_cells(_("Requested On"), $myrow['created_on'], "class='tableheader2'");
end_row();


$s = get_project_trans_view_str(ST_APPROVAL_LOG, $vehi_req_id."&source_type_id=".ST_VEHICLE_REQUEST, "Approval Status");        
label_cells($s, $approval_statuses[$myrow['approval_status']], "class='tableheader2'");
end_row();




end_page(true, false, false, ST_WORKORDER, $woid);

?>
