0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)) . "/main.inc.php")) { $res = @include substr($tmp, 0, ($i + 1)) . "/main.inc.php"; } if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php")) { $res = @include dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php"; } // Try main.inc.php using relative path if (!$res && file_exists("../main.inc.php")) { $res = @include "../main.inc.php"; } if (!$res && file_exists("../../main.inc.php")) { $res = @include "../../main.inc.php"; } if (!$res && file_exists("../../../main.inc.php")) { $res = @include "../../../main.inc.php"; } if (!$res) { die("Include of main fails"); } require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/user/class/usergroup.class.php'; require_once DOL_DOCUMENT_ROOT . '/custom/financialreport/class/userinvoice.class.php'; require_once DOL_DOCUMENT_ROOT . '/custom/settlements/class/groupusers.class.php'; require_once DOL_DOCUMENT_ROOT . '/custom/financialreport/class/helper.class.php'; require_once DOL_DOCUMENT_ROOT . '/custom/bbus/class/commissionhandler.class.php'; require_once DOL_DOCUMENT_ROOT . '/custom/bbus/class/userloginnaplo.class.php'; $helper = new HelperUserInvoice($db); $commmissionhandler = new CommissionHandler(); $userLoginNaploObj = new UserLoginNaplo($db); // Load translation files required by the page $langs->loadLangs(array("financialreport@financialreport")); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'int'); $id = GETPOST('id', 'int'); $idmenu = GETPOST('idmenu', 'int'); $daterange = GETPOST('daterange', 'alpha'); $datepicker = GETPOST('datepicker', 'alpha'); $interval = GETPOST('interval', 'alpha'); $array = GETPOST('array', 'array'); $options = GETPOST('options', 'array'); if ($daterange == '' && $datepicker == '') { $now = dol_now(); $daterange = date('Y-m-01') . ' - ' . date('Y-m-t'); $isSetDatepicker = true; } else { $daterange = $daterange != '' ? $daterange : $datepicker; $isSetDatepicker = $datepicker != ''; } $daterangeString = $helper->createDaterangeString($daterange); $socid = GETPOST('socid', 'int'); if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } $form = new Form($db); $formfile = new FormFile($db); $groupHotels = $helper->getGroupHotels(); include DOL_DOCUMENT_ROOT . '/custom/financialreport/core/actions_addupdatedelete.inc.php'; $title = ''; $help_url = ''; $morejs = ''; $morecss = ''; llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); $url = $_SERVER["PHP_SELF"] . "?id={$id}"; print '
' . "\n"; print ''; print ''; print ''; /*print ''; print ''; print ''; print '';*/ print ''; print ''; $now = date('Y.m.d', dol_now()); print load_fiche_titre($langs->trans("HotelGroupFinancialReport"), '', 'financialreport@financialreport'); include DOL_DOCUMENT_ROOT . '/custom/financialreport/core/tpl/daterangehoteldiv.tpl.php'; $entity = 4; $hotelsArray = $helper->getAllHotels(); //--------------------------------------------- # 1 //--------------------------------------------- foreach ($groupHotels as $record) { $usersList = $helper->getUsersList($record['fk_group_id'], $daterange, $entity); $usersIdList = $helper->getUsersIdList($record['fk_group_id'], $daterange, $entity); $AllAmountHUFInPeriod = $helper->getAllAmountInPeriod($record['fk_group_id'], $daterange, 'HUF', $usersIdList, $entity); $AllAmountEURInPeriod = $helper->getAllAmountInPeriod($record['fk_group_id'], $daterange, 'EUR', $usersIdList, $entity); $AllCommissionHUFInPeriod = $helper->getAllCommissionInPeriod($record['fk_group_id'], $daterange, 'HUF', $usersIdList, $entity); $AllCommissionEURHUFInPeriod = $helper->getAllCommissionInPeriod($record['fk_group_id'], $daterange, 'EUR', $usersIdList, $entity); print '
'; print ''; //print ''; print '
' . $langs->trans("settlements") . '
' . $record['groulabel'] . '
' . $record['hotellabel'] . '
' . $daterangeString . '
 
' . $langs->trans('Incomes') . '' . $langs->trans('Commissions') . '
' . $helper->correctNumber($AllAmountHUFInPeriod) . ' HUF' . $helper->correctNumber($AllCommissionHUFInPeriod) . ' HUF
' . $helper->correctNumber($AllAmountEURInPeriod) . ' EUR' . $helper->correctNumber($AllCommissionEURHUFInPeriod) . ' HUF
 
'; print '
'; } $colspan = 2; print '
' . "\n"; // End of page llxFooter(); $db->close(); ?>