From a918f3bf1129bc20fb69ab3771463410d598fcb6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 May 2011 21:56:35 +0000 Subject: [PATCH] Fix: Restore a broken feature. --- htdocs/compta/bank/account.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 97b0dd9f9c1..bc8cd6e16ce 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -143,7 +143,7 @@ if ($account || $_GET["ref"]) } else { - $viewline = 20; + $viewline = empty($conf->global->MAIN_SIZE_LISTE_LIMIT)?20:$conf->global->MAIN_SIZE_LISTE_LIMIT; } $acct = new Account($db); if ($account) @@ -212,7 +212,7 @@ if ($account || $_GET["ref"]) } if ($thirdparty) { - $sql_rech.=" AND (COALESCE(s.nom,'') LIKE '%".$db->escape($thirdparty)."%')"; + $sql_rech.=" AND s.nom LIKE '%".$db->escape($thirdparty)."%')"; $param.='&thirdparty='.urlencode($thirdparty); $mode_search = 1; } @@ -273,6 +273,7 @@ if ($account || $_GET["ref"]) $page = 0; $limitsql = $nbline; } + //print $limitsql.'-'.$page.'-'.$viewline; // Onglets $head=bank_prepare_head($acct); @@ -307,6 +308,7 @@ if ($account || $_GET["ref"]) $navig=''; $navig.='
'; $nbpage=floor($total_lines/$viewline)+($total_lines % $viewline > 0?1:0); // Nombre de page total + //print 'nbpage='.$nbpage.' viewline='.$viewline.' limitsql='.$limitsql; if ($limitsql > $viewline) { $navig.=''.img_previous().''; @@ -326,7 +328,7 @@ if ($account || $_GET["ref"]) $navig.= ''.img_next().''; } $navig.='
'; - + //var_dump($navig); // Confirmation delete if ($action == 'delete') @@ -340,7 +342,7 @@ if ($account || $_GET["ref"]) print ''; // Show title - if ($action != 'addline' && $action =='delete') + if ($action != 'addline' && $action != 'delete') { print ''; } @@ -742,11 +744,11 @@ if ($account || $_GET["ref"]) /* * Boutons actions */ - + if ($action != 'delete') { print '
'; - + if ($acct->type != 2 && $acct->rappro) // If not cash account and can be reconciliate { if ($user->rights->banque->consolidate) @@ -758,7 +760,7 @@ if ($account || $_GET["ref"]) print "trans("NotEnoughPermissions")."\" href=\"#\">".$langs->trans("Conciliate").""; } } - + if ($action != 'addline') { if ($user->rights->banque->modifier) @@ -770,10 +772,10 @@ if ($account || $_GET["ref"]) print "trans("NotEnoughPermissions")."\" href=\"#\">".$langs->trans("AddBankRecord").""; } } - + print '
'; } - + print '
'; }
'.$navig.'