<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_PROJECT_COST_ALLOCATION_INQ';
$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 . "/projects/includes/db/project_cost_allocation_inquiry_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'] != "")
{
	$id = $_GET['trans_no'];
//        $type_id = $_GET['source_type_id'];
}

global $approval_statuses;

display_heading("Project Cost Allocation Adjustment: " . $id);
br();

function get_tran_type_name($row)
{
	global $systypes_array;
  		 $s = $systypes_array[$row];
                 return $s;
}
function get_deduction_type($ded_type)
{
    $deduction_type_name = '';
    if($ded_type != 0)
    {
        $deduction_type_name = 'Yes';
    }
 else {
        $deduction_type_name = 'No';
 }
 return $deduction_type_name;
}
$myrow = view_project_cost_allocation_adjustment($id);
start_table(TABLESTYLE2, "width=90%");

start_row();

label_cells(_("Project Name"), $myrow['project_description'], "class='tableheader2'");
end_row();
label_cells(_("Budget"), $myrow['task_description'], "class='tableheader2'");
end_row();
label_cells(_("Deduction(Yes/No)"), get_deduction_type($myrow['deduction']), "class='tableheader2'");
end_row();
label_cells(_("Amount"), $myrow['amount'], "class='tableheader2'");
end_row();
label_cells(_("Date"), sql2date($myrow['tran_date']), "class='tableheader2'");
end_row();
label_cells(_("Reference Transaction Type"), get_tran_type_name($myrow['ref_tran_type']), "class='tableheader2'");
end_row();
label_cells(_("Reference Transaction No"), get_trans_view_str($myrow['ref_tran_type'],$myrow['ref_tran_no']), "class='tableheader2'");
end_row();
label_cells(_("Comment"), $myrow['comment'], "class='tableheader2'");
end_row();




//$s = get_project_trans_view_str(ST_APPROVAL_LOG, $vehi_req_id."&source_type_id=".ST_VEHICLE_REQUEST, "Approval Status");        

end_row();




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

?>
