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

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/assets/includes/ui/outstanding_tool_issue_details_inquiry_ui.inc"); 
include_once($path_to_root . "/assets/includes/db/outstanding_tool_issue_details_inquiry_db.inc"); 
include_once($path_to_root . "/projects/includes/db/project_sites_db.inc"); 
include_once($path_to_root . "/includes/db/group_companies_db.inc"); 
include_once($path_to_root . "/assets/includes/db/assets_db.inc"); 

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

page(_($help_context = "Outstanding Tool Issue Details Inquiry"), false, false, "", $js);

start_form();

    $Ajax->activate('outstanding_tool_issue_details');
    
    div_start('outstanding_tool_issue_details');
    
        display_outstanding_tool_issue_details_inquiry_selecting_parameters();

        if (isset($_POST['SearchItemTrans'])) {
            display_outstanding_tool_issue_details_inquiry($_POST['asset_id'], $_POST['trans_no'], $_POST['type'], $_POST['project_id'], $_POST['job_id'], 
                                                           $_POST['location'], $_POST['employee_code'], $_POST['from_date'], $_POST['to_date']);
        } else {
            display_note('Select filterings then click search button.', 2, 2, "style=color:red");
        }
    
    div_end();

end_form(3);

end_page(@$_GET['popup'], false, false);

?>