From efd5f5eaa464b6b7abbb2ddf636a811561bdca48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Dec 2011 00:33:34 +0100 Subject: [PATCH] Look: Add line "None" when there is no bank account --- htdocs/compta/bank/index.php | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index 08aaad1c78d..f4ca4a278e7 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -20,7 +20,7 @@ /** * \file htdocs/compta/bank/index.php * \ingroup banque - * \brief Page accueil banque + * \brief Home page of bank module */ require("./pre.inc.php"); @@ -43,7 +43,8 @@ $statut=isset($_GET["statut"])?$_GET["statut"]:''; * View */ -llxHeader(); +$help_url='EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas'; +llxHeader('',$langs->trans('AccountsArea'),$help_url); $link=''; if ($statut == '') $link=''.$langs->trans("IncludeClosedAccount").''; @@ -88,12 +89,14 @@ print ''.$langs->trans("Status").''; print ''.$langs->trans("BankBalance").''; print "\n"; -$total = 0; +$total = 0; $found = 0; $var=true; foreach ($accounts as $key=>$type) { if ($type == 1) { + $found++; + $acc = new Account($db); $acc->fetch($key); @@ -122,12 +125,12 @@ foreach ($accounts as $key=>$type) $total += $solde; } } - +if (! $found) print ''.$langs->trans("None").''; // Total print ''.$langs->trans("Total").''.price($total).''; -print ' '; +//print ' '; /* @@ -140,13 +143,15 @@ print ''.$langs->trans("Status").''; print ''.$langs->trans("BankBalance").''; print "\n"; -$total = 0; +$total = 0; $found = 0; $var=true; foreach ($accounts as $key=>$type) { if ($type == 2) { - $acc = new Account($db); + $found++; + + $acc = new Account($db); $acc->fetch($key); $var = !$var; @@ -166,13 +171,13 @@ foreach ($accounts as $key=>$type) $total += $solde; } } - +if (! $found) print ''.$langs->trans("None").''; // Total print ''.$langs->trans("Total").''.price($total).''; -print ' '; +//print ' '; /* @@ -187,13 +192,15 @@ print ''.$langs->trans("Status").''; print ''.$langs->trans("BankBalance").''; print "\n"; -$total = 0; +$total = 0; $found = 0; $var=true; foreach ($accounts as $key=>$type) { if ($type == 0) { - $acc = new Account($db); + $found++; + + $acc = new Account($db); $acc->fetch($key); $var = !$var; @@ -221,7 +228,7 @@ foreach ($accounts as $key=>$type) $total += $solde; } } - +if (! $found) print ''.$langs->trans("None").''; // Total print ''.$langs->trans("Total").''.price($total).''; @@ -241,7 +248,7 @@ if ($user->rights->banque->configurer) { print ""; -$db->close(); - llxFooter(); + +$db->close(); ?>