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

include($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc"); 
include_once($path_to_root . "/inventory/includes/ui/material_lists_ui.inc");
include_once($path_to_root . "/inventory/includes/db/material_lists_db.inc"); 
include_once($path_to_root . "/inventory/includes/ui/job_material_requisitions_ui.inc");
include_once($path_to_root . "/inventory/includes/db/job_material_requisitions_db.inc");
include_once($path_to_root . "/purchasing/includes/ui/direct_purchase_requisitions_ui.inc");
include_once($path_to_root . "/purchasing/includes/db/direct_purchase_requisitions_db.inc");
include_once($path_to_root . "/projects/includes/db/projects_db.inc"); 

$js = "";
$js .= get_js_open_window(800, 500);

global $systypes_array;

page(_($help_context = "View ".$systypes_array[ST_MATERIAL_LIST]), true, false, "", $js);

if (isset($_GET["trans_no"])) {
    $trans_no = $_GET["trans_no"];
}

br(1);

    display_heading($systypes_array[ST_MATERIAL_LIST]." #$trans_no");

    view_material_list_header(ST_MATERIAL_LIST, $trans_no);

    display_heading($systypes_array[ST_MATERIAL_LIST]." Details");

    view_material_list_details(ST_MATERIAL_LIST, $trans_no);
    
    view_job_material_requisition_headers_by_sources(ST_MATERIAL_LIST, $trans_no);

    view_direct_purchase_requisition_headers_by_sources(ST_MATERIAL_LIST, $trans_no);
    
end_page(true, false, false, ST_MATERIAL_LIST, $trans_no);

?>