<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_JOB_MATERIAL_REQ_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/job_material_requisitions_ui.inc");
include_once($path_to_root . "/inventory/includes/db/job_material_requisitions_db.inc"); 
include_once($path_to_root . "/inventory/includes/ui/job_material_issue_requisitions_ui.inc");
include_once($path_to_root . "/inventory/includes/ui/job_material_issues_ui.inc"); 
include_once($path_to_root . "/inventory/includes/db/job_material_issues_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"); 
include_once($path_to_root . "/payroll/includes/db/employees_db.inc");

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

global $systypes_array;

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

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

br(2);

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

    $jmr_no = view_job_material_requisition_header(ST_JOB_MATERIAL_REQ, $trans_no);

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

    view_job_material_requisition_details(ST_JOB_MATERIAL_REQ, $trans_no);
    
    view_job_material_issue_requisition_headers_by_source($trans_no, ST_JOB_MATERIAL_REQ);
    
    view_job_material_issue_return_headers_by_jmr_no($jmr_no, ST_JOB_MATERIAL_ISSUE);
    
    view_job_material_issue_return_headers_by_jmr_no($jmr_no, ST_JOB_MATERIAL_RETURN);
    
    view_direct_purchase_requisition_headers_by_sources(ST_JOB_MATERIAL_REQ, $trans_no);
    
end_page(true, false, false, ST_JOB_MATERIAL_REQ, $trans_no);

?>