<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_OUTSIDE_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/outside_material_requisitions_ui.inc");
include_once($path_to_root . "/inventory/includes/db/outside_material_requisitions_db.inc"); 
include_once($path_to_root . "/inventory/includes/ui/outside_material_receipts_ui.inc");
include_once($path_to_root . "/inventory/includes/db/outside_material_receipts_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_OUTSIDE_MATERIAL_REQ]), true, false, "", $js);

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

br(2);

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

    $omr_no = view_outside_material_requisition_header(ST_OUTSIDE_MATERIAL_REQ, $trans_no);

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

    view_outside_material_requisition_details(ST_OUTSIDE_MATERIAL_REQ, $trans_no);
    
    view_outside_material_receipt_return_headers_by_omr_no($omr_no, ST_OUTSIDE_MATERIAL_RECEIPT);
    
end_page(true, false, false, ST_OUTSIDE_MATERIAL_REQ, $trans_no);

?>