<?php
/****************************************
/*  Author 	: Kvvaradha
/*  Module 	: Kvcodes CRM
/*  E-mail 	: admin@kvcodes.com
/*  Version : 1.0
/*  Http 	: www.kvcodes.com
/* Function : Reports Main File
*****************************************/
$page_security = 'SA_OPEN';
$path_to_root="..";

//include($path_to_root . "/includes/session.inc");

//include_once($path_to_root . "/includes/data_checks.inc");
//include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/modules/KvcodesCRM/reporting/reports_classes.inc");

$js = '';
	if ($SysPrefs->use_popup_windows) 
		$js .= get_js_open_window(900, 500);	

	if (user_use_date_picker()) 
		$js .= get_js_date_picker();
	

add_js_file('reports.js');

page(_($help_context = "Reports and Analysis"), false, false, "", $js);

//$reports = new BoxReports;

$dim = get_company_pref('use_dimension');

$reports->addReportClass(_('Kvcodes CRM Reports'), RC_KVCODESCRM);

	$reports->addReport(RC_KVCODESCRM, 120, _('Print Estimates'),
       array( _('From') => 'QUOTATIONS',
			_('To') => 'QUOTATIONS',
			_('Currency Filter') => 'CURRENCY',
			_('Email Customers') => 'YES_NO',
			_('Comments') => 'TEXTBOX',
			_('Orientation') => 'ORIENTATION'));
    $reports->addReport(RC_KVCODESCRM, 121, _('Print Proposal'),
       array( _('From') => 'QUOTATIONS',
			_('To') => 'QUOTATIONS',
			_('Currency Filter') => 'CURRENCY',
			_('Email Customers') => 'YES_NO',
			_('Comments') => 'TEXTBOX',
			_('Orientation') => 'ORIENTATION'));
   
add_custom_reports($reports);

echo $reports->getDisplay(); 
end_page(); 
/*
global $reports;

$reports->addReport(RC_CUSTOMER,"120",_('Print Estimates'),
       array( _('From') => 'QUOTATIONS',
			_('To') => 'QUOTATIONS',
			_('Currency Filter') => 'CURRENCY',
			_('Email Customers') => 'YES_NO',
			_('Comments') => 'TEXTBOX',
			_('Orientation') => 'ORIENTATION'));

$reports->addReport(RC_CUSTOMER,"121",_('Print Proposal'),
       array( _('From') => 'QUOTATIONS',
			_('To') => 'QUOTATIONS',
			_('Currency Filter') => 'CURRENCY',
			_('Email Customers') => 'YES_NO',
			_('Comments') => 'TEXTBOX',
			_('Orientation') => 'ORIENTATION'));*/