<?php
/*=======================================================\
|                 Point of Sales Module                  |
|--------------------------------------------------------|
|   Creator: Phương                                      |
|   Date :   18-Dec-2017                                 |
|   Description: ERP Point of Sales Extension            |
|   Website: http://notrinos.com                         |
|                                                        |
\=======================================================*/

$path_to_root = "../../..";
global $page_security;
$page_security = 'SA_OPEN';
include_once($path_to_root . "/includes/session.inc");

if (!isset($_POST['REP_ID'])) {
	$def_pars = array(0, 0, '', '', 0, '', '', 0);
	$rep = $_POST['REP_ID'] = $_GET['REP_ID'];

	for($i=0; $i<=4; $i++) {
		$_POST['PARAM_'.$i] = isset($_GET['PARAM_'.$i]) ? $_GET['PARAM_'.$i] : $def_pars[$i];
	}
}

$rep = preg_replace('/[^a-z_0-9]/i', '', $_POST['REP_ID']);

$rep_file = $path_to_root."/modules/pos/reporting/rep$rep.php";

if (file_exists($rep_file))
	require($rep_file);
else {
	page('');
	display_error(_('Report') . '&nbsp;' . $rep . '&nbsp;' . _('could not be found.'));
	display_footer_exit();
}
exit();