Merge branch 'bug-1546' of github.com:marcosgdf/dolibarr into

marcosgdf-bug-1546

Conflicts:
	ChangeLog
This commit is contained in:
Laurent Destailleur 2014-09-14 21:39:25 +02:00
commit c4facf20e6
2 changed files with 16 additions and 10 deletions

View File

@ -30,6 +30,7 @@ Fix: [ bug #1591 ] Linked object block shows Total HT/TTC even if not having per
Fix: [ bug #1577 ] When creating new Private individual third, selected third type is ignored
Fix: [ bug #1555 ] Update accountancy code of products does not throw PRODUCT_MODIFY trigger
Fix: [ bug #1548 ] Supplier payment card shows type in French
Fix: [ bug #1546 ] Incorrect page number when searching in the list of bank transactions
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled.

View File

@ -5,7 +5,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -253,17 +253,22 @@ if ($id > 0 || ! empty($ref))
//Total pages
$totalPages = ceil($total_lines/$viewline);
if ($page > 0)
{
$limitsql = ($totalPages - $page) * $viewline;
if ($limitsql < $viewline) $limitsql = $viewline;
$nbline = $limitsql;
}
else
{
if ($totalPages == 0) {
$page = 0;
$limitsql = $nbline;
} else {
if ($page > 0) {
$limitsql = ($totalPages - $page) * $viewline;
if ($limitsql < $viewline) {
$limitsql = $viewline;
}
$nbline = $limitsql;
} else {
$page = 0;
$limitsql = $nbline;
}
}
//print $limitsql.'-'.$page.'-'.$viewline;
// Onglets