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

include($path_to_root . "/includes/session.inc");
include($path_to_root . "/includes/ui/ui_input.inc"); 
include_once($path_to_root . "/dashboard/includes/ui/view_dashboard_sales_pnl_ui.inc"); 
include_once($path_to_root . "/dashboard/includes/db/view_dashboard_sales_pnl_db.inc"); 
include_once($path_to_root . "/dashboard/includes/db/dashboard_sales_pnl_db.inc"); 
include_once($path_to_root . "/projects/includes/db/projects_db.inc"); 
include_once($path_to_root . "/includes/ui/ui_controls_custom.inc"); 
include_once($path_to_root . "/includes/ui/ui_view_custom.inc"); 
include_once($path_to_root . "/admin/db/list_values_db.inc"); 

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

page(_($help_context = "Dashboard Sales L&P View"), true, false, "", $js);

$from_date = $to_date = $entry_type_id = $type = -1;

if (isset($_GET['entry_type_id'])) {
    $entry_type_id = $_GET['entry_type_id'];
}
if (isset($_GET['from_date'])) {
    $from_date = $_GET['from_date'];
}
if (isset($_GET['to_date'])) {
    $to_date = $_GET['to_date'];
}
if (isset($_GET['type'])) {
    $type = $_GET['type'];
}

dashboard_view_sales_pnl($from_date, $to_date, $entry_type_id, $type);

end_page(true, false, false, DASH_SC_SALES_PNL, $_GET['entry_type_id']);

?>