<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_SUPPTRANSVIEW';
$path_to_root = "../..";
include($path_to_root . "/purchasing/includes/po_class.inc");

include($path_to_root . "/includes/session.inc");
include($path_to_root . "/purchasing/includes/ui/purchasing_ui.inc");

$js = "";
if ($SysPrefs->use_popup_windows)
	$js .= get_js_open_window(900, 500);
page(_($help_context = "View Purchase Order"), true, false, "", $js);


if (!isset($_GET['trans_no']))
{
	die ("<br>" . _("This page must be called with a purchase order number to review."));
}

display_heading(_("Approval History - Purchase Requisition") . " #" . $_GET['trans_no']);

$pr_approval_history = get_pr_approval_history($_GET['trans_no']);

//$myrow = db_fetch($pr_approval_history);

echo "<br>";
start_table(TABLESTYLE, "width=90%", 6);
echo "<tr><td valign=top>"; // outer table

//display_heading2(_("Order Reference") . " #" . $myrow['reference']);

start_table(TABLESTYLE, "colspan=9 width=100%");

$th = array(_("Approval Hierarchy"), _("User Name"), _("Status Seq. No."), 
                _("PR Status"), _("Comment"), _("Updated On"));
table_header($th);

$total = $k = 0;
$overdue_items = false;

//while ($myrow = db_fetch($pr_approval_history))
while ($myrow = db_fetch($pr_approval_history))
{

	alt_table_row_color($k);

	label_cell($myrow ['approval_hierarchy_name']);
	label_cell($myrow ['user_name']);
	label_cell($myrow ['seq_number']);
	label_cell($myrow ['pr_status']);
	label_cell($myrow ['comment']);
	label_cell($myrow ['updated_on']);
        

	end_row();

}

start_row();
end_row();

end_table();

echo "</td></tr>";

end_table(1); // outer table

//----------------------------------------------------------------------------------------------------

end_page(true, false, false, ST_PURCHORDER, $_GET['trans_no']);

?>
