diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php
index 77485c6d638..4453f2d8302 100644
--- a/dev/skeletons/skeleton_list.php
+++ b/dev/skeletons/skeleton_list.php
@@ -523,7 +523,7 @@ if (isset($totalarray['totalhtfield']))
$i++;
if ($i == 1)
{
- if ($num < $limit) print '
'.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' | ';
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index d85448397de..efb72afb7b7 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -991,7 +991,7 @@ if ($resql)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' | ';
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 80601ec9727..e62ae11d5cd 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -1412,7 +1412,7 @@ if ($resql)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' | ';
diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php
index 72e82dd0dd7..4845012a3e0 100644
--- a/htdocs/compta/bank/bankentries.php
+++ b/htdocs/compta/bank/bankentries.php
@@ -1307,7 +1307,7 @@ if ($resql)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totaldebfield'] == $i) print ''.price(-1 * $totalarray['totaldeb']).' | ';
diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php
index 012dfe42175..5f6e30016d4 100644
--- a/htdocs/compta/bank/index.php
+++ b/htdocs/compta/bank/index.php
@@ -607,7 +607,7 @@ if (isset($totalarray['totalbalancefield']) && $lastcurrencycode != 'various') /
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalbalancefield'] == $i) print ''.price($totalarray['totalbalance'], 0, $langs, 0, 0, -1, $lastcurrencycode).' | ';
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 693a6f39f97..c5fd9b80482 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -1117,7 +1117,7 @@ if ($resql)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' | ';
diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php
index 66d6a65dd56..e3f4a0b9b4d 100644
--- a/htdocs/compta/sociales/index.php
+++ b/htdocs/compta/sociales/index.php
@@ -274,7 +274,7 @@ if ($resql)
if (isset($totalarray['totalttcfield']))
{
print '';
- if ($num < $limit) print '| '.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
print ' | ';
print ' | ';
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index 58541330c83..ca7a52ad293 100644
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -694,7 +694,7 @@ if ($resql)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' | ';
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 9ef7d22ad10..bafafb40dd1 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -518,7 +518,7 @@ if ($result)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totaldurationfield'] == $i) print ''.convertSecondToTime($totalarray['totalduration'], 'allhourmin').' | ';
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 396d5ffd8a5..77064191d24 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -970,7 +970,7 @@ if ($resql)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' | ';
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index 2910103e380..3d89aee0013 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -570,7 +570,7 @@ if ($resql)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' | ';
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 51f260cac6f..408031a9ed2 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -854,7 +854,7 @@ if (isset($totalarray['totaloppfield']) || isset($totalarray['totalbudgetfield']
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totaloppfield'] == $i) print ''.price($totalarray['totalopp']).' | ';
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index 30a89109115..482c7b6f446 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -811,7 +811,7 @@ if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['tota
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totalplannedworkloadfield'] == $i) print ''.convertSecondToTime($totalarray['totalplannedworkload'],$plannedworkloadoutputformat).' | ';
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 6cb52588a89..4c5d58dab7d 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -971,7 +971,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$i++;
if ($i == 1)
{
- if ($num < $limit) print ''.$langs->trans("Total").' | ';
+ if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' | ';
else print ''.$langs->trans("Totalforthispage").' | ';
}
elseif ($totalarray['totaldurationfield'] == $i) print ''.convertSecondToTime($totalarray['totalduration'],'allhourmin').' | ';