<?php
/**********************************************************************
    Copyright (C) FrontAccounting, LLC.
	Released under the terms of the GNU General Public License, GPL, 
	as published by the Free Software Foundation, either version 3 
	of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_JOB_CARDS_VIEW';
$path_to_root = "..";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui/ui_input.inc"); 
include_once($path_to_root . "/dashboard/includes/ui/dashboard_aged_job_orders_view_ui.inc"); 
include_once($path_to_root . "/services/includes/ui/job_order_entry_ui.inc"); 
include_once($path_to_root . "/services/includes/db/job_orders_db.inc");
include_once($path_to_root . "/includes/ui/ui_lists_custom.inc"); 
include_once($path_to_root . "/admin/db/list_values_db.inc"); 
include_once($path_to_root . "/includes/ui/ui_controls_custom.inc");
include_once($path_to_root . "/includes/ui/ui_view_custom.inc"); 

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

page(_($help_context = "Aged ".$systypes_array[ST_JOB_ORDER]."s View"), false, false, "", $js);

start_form();

    global $Ajax;

    display_aged_job_orders_filtering_parameters();
    
    $Ajax->activate('job_orders_view');
    div_start('job_orders_view');
    
        display_aged_job_orders_view($_POST['to_date'], $_POST['department_id'], $_POST['approval_status'], $_POST['num_of_months']);
    
    div_end();

end_form(2);
end_page(true);

?>