$historyList->setTemplate('/Web/Templates/Lists/ListFull');
$historyListHeaderView->setTemplate('/Web/Templates/Lists/Header/HeaderTable');
/*
 * Header
 */
$historyListHeaderView->setTitle($lang['History']);
$historyListHeaderView->setHeader([['title' => $lang['ID'], 'sortable' => true, 'full' => true], ['title' => $lang['Leasing'], 'sortable' => true], ['title' => $lang['Tax'], 'sortable' => true], ['title' => $lang['Rep./Insp.'], 'sortable' => true], ['title' => $lang['Wheels'], 'sortable' => true], ['title' => $lang['Gas'], 'sortable' => true], ['title' => $lang['Misc'], 'sortable' => true], ['title' => $lang['Sum'], 'sortable' => true], ['title' => $lang['Diff'], 'sortable' => true], ['title' => $lang['Leasing'], 'sortable' => true], ['title' => $lang['Tax'], 'sortable' => true], ['title' => $lang['Rep./Insp.'], 'sortable' => true], ['title' => $lang['Wheels'], 'sortable' => true], ['title' => $lang['Gas'], 'sortable' => true], ['title' => $lang['Misc'], 'sortable' => true], ['title' => $lang['Sum'], 'sortable' => true], ['title' => $lang['Diff'], 'sortable' => true], ['title' => $lang['Leasing'], 'sortable' => true], ['title' => $lang['Tax'], 'sortable' => true], ['title' => $lang['Rep./Insp.'], 'sortable' => true], ['title' => $lang['Wheels'], 'sortable' => true], ['title' => $lang['Gas'], 'sortable' => true], ['title' => $lang['Misc'], 'sortable' => true], ['title' => $lang['Sum'], 'sortable' => true]]);
$historyList->setFreeze(1, 1);
$historyList->addView('header', $historyListHeaderView);
// tODO: add headline sum
$sum1 = $accountData[$year][4574] + $accountData[$year][4340] + $accountData[$year][4573] + $accountData[$year][4575] + $accountData[$year][4572] + $accountData[$year][4580];
$sum2 = $accountData[$year - 1][4574] + $accountData[$year - 1][4340] + $accountData[$year - 1][4573] + $accountData[$year - 1][4575] + $accountData[$year - 1][4572] + $accountData[$year - 1][4580];
$sum3 = $accountData[$year - 2][4574] + $accountData[$year - 2][4340] + $accountData[$year - 2][4573] + $accountData[$year - 2][4575] + $accountData[$year - 2][4572] + $accountData[$year - 2][4580];
$diff1 = $sum2 != 0 ? ($sum1 - $sum2) / $sum2 : 'NA';
$diff2 = $sum3 != 0 ? ($sum2 - $sum3) / $sum3 : 'NA';
$historyList->addElements(['SUM', number_format($accountData[$year][4574], 2), number_format($accountData[$year][4340], 2), number_format($accountData[$year][4573], 2), number_format($accountData[$year][4575], 2), number_format($accountData[$year][4572], 2), number_format($accountData[$year][4580], 2), number_format($sum1, 2), number_format(number_format($diff1 * 100, 2), 2) . '%', number_format($accountData[$year - 1][4574], 2), number_format($accountData[$year - 1][4340], 2), number_format($accountData[$year - 1][4573], 2), number_format($accountData[$year - 1][4575], 2), number_format($accountData[$year - 1][4572], 2), number_format($accountData[$year - 1][4580], 2), number_format($sum2, 2), number_format(number_format($diff2 * 100, 2), 2) . '%', number_format($accountData[$year - 2][4574], 2), number_format($accountData[$year - 2][4340], 2), number_format($accountData[$year - 2][4573], 2), number_format($accountData[$year - 2][4575], 2), number_format($accountData[$year - 2][4572], 2), number_format($accountData[$year - 2][4580], 2), number_format($sum3, 2)]);
foreach ($cars as $key => $car) {
    $sum1 = $carData[$key][$year][4574] + $carData[$key][$year][4340] + $carData[$key][$year][4573] + $carData[$key][$year][4575] + $carData[$key][$year][4572] + $carData[$key][$year][4580];
    $sum2 = $carData[$key][$year - 1][4574] + $carData[$key][$year - 1][4340] + $carData[$key][$year - 1][4573] + $carData[$key][$year - 1][4575] + $carData[$key][$year - 1][4572] + $carData[$key][$year - 1][4580];
    $sum3 = $carData[$key][$year - 2][4574] + $carData[$key][$year - 2][4340] + $carData[$key][$year - 2][4573] + $carData[$key][$year - 2][4575] + $carData[$key][$year - 2][4572] + $carData[$key][$year - 2][4580];
    $diff1 = $sum2 != 0 ? ($sum1 - $sum2) / $sum2 : 'NA';
    $diff2 = $sum3 != 0 ? ($sum2 - $sum3) / $sum3 : 'NA';
    $historyList->addElements([$key, number_format($carData[$key][$year][4574], 2), number_format($carData[$key][$year][4340], 2), number_format($carData[$key][$year][4573], 2), number_format($carData[$key][$year][4575], 2), number_format($carData[$key][$year][4572], 2), number_format($carData[$key][$year][4580], 2), number_format($sum1, 2), number_format($diff1 * 100, 2) . '%', number_format($carData[$key][$year - 1][4574], 2), number_format($carData[$key][$year - 1][4340], 2), number_format($carData[$key][$year - 1][4573], 2), number_format($carData[$key][$year - 1][4575], 2), number_format($carData[$key][$year - 1][4572], 2), number_format($carData[$key][$year - 1][4580], 2), number_format($sum2, 2), number_format($diff2 * 100, 2) . '%', number_format($carData[$key][$year - 2][4574], 2), number_format($carData[$key][$year - 2][4340], 2), number_format($carData[$key][$year - 2][4573], 2), number_format($carData[$key][$year - 2][4575], 2), number_format($carData[$key][$year - 2][4572], 2), number_format($carData[$key][$year - 2][4580], 2), number_format($sum3, 2)]);
}
$tabView->addTab($lang['History'], $historyList->getOutput(), 'history');
/*
 * UI Logic
 */
$planningList = new \Web\Views\Lists\ListView($this->l11n, $this->request, $this->response);
$planningListHeaderView = new \Web\Views\Lists\HeaderView($this->l11n, $this->request, $this->response);
$planningList->setTemplate('/Web/Templates/Lists/ListFull');
 * UI Logic
 */
$accountListView = new \Web\Views\Lists\ListView($this->l11n, $this->request, $this->response);
$headerView = new \Web\Views\Lists\HeaderView($this->l11n, $this->request, $this->response);
$footerView = new \Web\Views\Lists\PaginationView($this->l11n, $this->request, $this->response);
$accountListView->setTemplate('/Web/Templates/Lists/ListFull');
$headerView->setTemplate('/Web/Templates/Lists/Header/HeaderTable');
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
/*
 * Header
 */
$headerView->setTitle($this->l11n->lang[1]['Accounts']);
$headerView->setHeader([['title' => $this->l11n->lang[1]['Status'], 'sortable' => true], ['title' => $this->l11n->lang[0]['ID'], 'sortable' => true], ['title' => $this->l11n->lang[1]['Name'], 'sortable' => true, 'full' => true], ['title' => $this->l11n->lang[1]['Activity'], 'sortable' => true], ['title' => $this->l11n->lang[1]['Created'], 'sortable' => true]]);
foreach ($this->getData('list:elements') as $key => $value) {
    $url = \phpOMS\Uri\UriFactory::build('/{/lang}/Backend/admin/account/single/front.php?id=' . (int) $value['account_id']);
    $accountListView->addElements(['<a href="' . $url . '">' . $value['account_status'] . '</a>', '<a href="' . $url . '">' . $value['account_id'] . '</a>', '<a href="' . $url . '">' . $value['account_data_name1'] . '</a>', '<a href="' . $url . '">' . $value['account_lactive'] . '</a>', '<a href="' . $url . '">' . $value['account_created'] . '</a>']);
}
/*
 * Footer
 */
$footerView->setPages($this->getData('list:count') / 25);
$footerView->setPage(1);
$footerView->setResults($this->getData('list:count'));
$accountListView->addView('header', $headerView);
$accountListView->addView('footer', $footerView);
/*
 * Navigation
 */
$nav = new \Modules\Navigation\Views\NavigationView($this->l11n, $this->request, $this->response);
$nav->setTemplate('/Modules/Navigation/Theme/Backend/mid');
$nav->setNav($this->getData('nav'));
 * UI Logic
 */
$groupListView = new \Web\Views\Lists\ListView($this->l11n, $this->request, $this->response);
$headerView = new \Web\Views\Lists\HeaderView($this->l11n, $this->request, $this->response);
$footerView = new \Web\Views\Lists\PaginationView($this->l11n, $this->request, $this->response);
$groupListView->setTemplate('/Web/Templates/Lists/ListFull');
$headerView->setTemplate('/Web/Templates/Lists/Header/HeaderTable');
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
/*
 * Header
 */
$headerView->setTitle($this->l11n->lang[1]['Groups']);
$headerView->setHeader([['title' => $this->l11n->lang[0]['ID'], 'sortable' => true], ['title' => $this->l11n->lang[1]['Name'], 'sortable' => true, 'full' => true], ['title' => $this->l11n->lang[1]['Parents'], 'sortable' => true], ['title' => $this->l11n->lang[1]['Children'], 'sortable' => true], ['title' => $this->l11n->lang[1]['Members'], 'sortable' => true]]);
foreach ($this->getData('list:elements') as $key => $value) {
    $url = \phpOMS\Uri\UriFactory::build('/{/lang}/Backend/admin/group/single/front.php?id=' . $value['group_id']);
    $groupListView->addElements(['<a href="' . $url . '">' . $value['group_id'] . '</a>', '<a href="' . $url . '">' . $value['group_name'] . '</a>', null, null, null]);
}
/*
 * Footer
 */
$footerView->setPages($this->getData('list:count') / 25);
$footerView->setPage(1);
$footerView->setResults($this->getData('list:count'));
$groupListView->addView('header', $headerView);
$groupListView->addView('footer', $footerView);
/*
 * Navigation
 */
$nav = new \Modules\Navigation\Views\NavigationView($this->l11n, $this->request, $this->response);
$nav->setTemplate('/Modules/Navigation/Theme/Backend/mid');
$nav->setNav($this->getData('nav'));
$overviewCostCenterView->addElements(['3300', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewCostCenterView->addView('header', $overviewCostCenterHeaderView);
/*
 * UI Logic
 */
$overviewAccountView = new \Web\Views\Lists\ListView($this->l11n, $this->request, $this->response);
$overviewAccountHeaderView = new \Web\Views\Lists\HeaderView($this->l11n, $this->request, $this->response);
$overviewAccountView->setTemplate('/Web/Templates/Lists/ListFull');
$overviewAccountHeaderView->setTemplate('/Web/Templates/Lists/Header/HeaderTable');
/*
 * Header
 */
$overviewAccountHeaderView->setTitle($lang['Account']);
$overviewAccountHeaderView->setHeader([['title' => $lang['Type'], 'sortable' => true], ['title' => $lang['Description'], 'sortable' => true, 'full' => true], ['title' => $lang['History'], 'sortable' => true], ['title' => $lang['Current'], 'sortable' => true], ['title' => $lang['Forecast'], 'sortable' => true], ['title' => $lang['Diff'], 'sortable' => true]]);
$overviewAccountView->setFreeze(1, 2);
$overviewAccountView->addElements(['4480', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4481', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4482', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4483', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4484', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4485', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4490', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4490', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4490', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addElements(['4490', 'Auslandskurs', '0.00', '0.00', '0.00', '0.00%']);
$overviewAccountView->addView('header', $overviewAccountHeaderView);
$graphProgressView = new \Web\Views\Panel\PanelView($this->l11n, $this->request, $this->response);
$graphProgressView->setTemplate('/Web/Templates/Panel/BoxFull');
$graphProgressView->setTitle($lang['Progress']);
$tabView->addTab($lang['Overview'], $overviewCompareList->getOutput() . $overviewTypeListView->render() . $overviewCostCenterView->render() . $overviewAccountView->render() . $graphProgressView->render(), 'overview');
/*