<?php
/**********************************************************************
***********************************************************************/
$page_security = 'SA_PURCH_REQ_INQ';
$path_to_root="../..";
include_once($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");

include_once($path_to_root . "/purchasing/includes/ui/outstanding_purchase_requisition_detail_inquiry_ui.inc");
include_once($path_to_root . "/reporting/includes/reporting.inc");
include_once($path_to_root . "/purchasing/includes/db/purchase_requisitions_inquiry_db.inc");


$js = "";
if ($SysPrefs->use_popup_windows)
        $js .= get_js_open_window(900, 500);
if (user_use_date_picker())
        $js .= get_js_date_picker();
page(_($help_context = "Outstanding Purchase Requisition Details Inquiry"), false, false, "", $js);

global $Ajax;

$Ajax->activate("outstanding_prd");
start_form();

    outstanding_purchase_requisition_details_filtering_controls();
    
    div_start("outstanding_prd");
    
    if(isset($_POST['SearchOrders'])){
        display_outstanding_purchase_requisition_details_inquiry(get_post('OrdersAfterDate'), get_post('OrdersToDate'), get_post('pr_no'), get_post('reference'),
                                                            get_post('StockLocation'), get_post('project_id'), get_post('originator_id'));
    }else{
        br(2);
        display_note("Please select filtering pameters and click on Search button. Maximum of 1000 records will be displayed");
        br(2);
    }

    div_end();
end_form();

end_page();
	

