diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 8132b0729a7..28ad1b8081d 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -185,6 +185,8 @@ if (!empty($id)) { print dol_get_fiche_end(); +$head = bank_report_prepare_head($object); +print dol_get_fiche_head($head, 'annual', $langs->trans("FinancialAccount"), 0); // Affiche tableau print load_fiche_titre('', $link, ''); @@ -487,6 +489,7 @@ if ($result < 0) { print "\n
\n"; +print dol_get_fiche_end(); // End of page llxFooter(); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index be7ff72baf1..658f55fb416 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -772,7 +772,7 @@ if ($result < 0) { // Onglets $head = bank_prepare_head($object); -print dol_get_fiche_head($head, 'graph', $langs->trans("FinancialAccount"), 0, 'account'); +print dol_get_fiche_head($head, 'annual', $langs->trans("FinancialAccount"), 0, 'account'); $linkback = ''.$langs->trans("BackToList").''; @@ -807,6 +807,8 @@ if ($account) { print dol_get_fiche_end(); +$head = bank_report_prepare_head($object); +print dol_get_fiche_head($head, 'graph', $langs->trans("FinancialAccount"), 0); print ''; @@ -882,6 +884,7 @@ if ($mode == 'showalltime') { print ''; } +print dol_get_fiche_end(); // End of page llxFooter(); diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 5815d177767..70e26cb2d5d 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -133,15 +133,10 @@ function bank_prepare_head(Account $object) $h++; $head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$object->id; - $head[$h][1] = $langs->trans("IOMonthlyReporting"); + $head[$h][1] = $langs->trans("Report"); $head[$h][2] = 'annual'; $h++; - $head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$object->id; - $head[$h][1] = $langs->trans("Graph"); - $head[$h][2] = 'graph'; - $h++; - $head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$object->id; $head[$h][1] = $langs->trans("PlannedTransactions"); $head[$h][2] = 'cash'; @@ -162,6 +157,32 @@ function bank_prepare_head(Account $object) return $head; } + +/** + * Prepare array with list of tabs for bank report + * + * @param Account $object Object related to tabs + * @return array Array of tabs to show + */ +function bank_report_prepare_head(Account $object) +{ + global $db, $langs, $conf, $user; + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$object->id; + $head[$h][1] = $langs->trans("IOMonthlyReporting"); + $head[$h][2] = 'annual'; + $h++; + + $head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$object->id; + $head[$h][1] = $langs->trans("Graph"); + $head[$h][2] = 'graph'; + $h++; + + return $head; +} /** * Prepare array with list of tabs *