';
+ }
- $db->free($result);
+ $db->free($resql);
+
+ $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
+ $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
+
+ print ''."\n";
+ print ''."\n";
+
+ print ''."\n";
} else {
dol_print_error($db);
}
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 2ef50801717..5937eda916c 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -2415,16 +2415,27 @@ if ($resql) {
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
}
+ // If no record found
+ if ($num == 0) {
+ $colspan = 1;
+ foreach ($arrayfields as $key => $val) {
+ if (!empty($val['checked'])) {
+ $colspan++;
+ }
+ }
+ print '
'.$langs->trans("NoRecordFound").'
';
+ }
+
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
- $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
+ $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
- print "\n";
- print '';
+ print ''."\n";
+ print ''."\n";
- print "\n";
+ print ''."\n";
// Show the file area only when this page is not opend from the Extended POS
if ($contextpage != 'poslist') {
diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php
index 8d63e52256e..082a485f817 100644
--- a/htdocs/compta/sociales/list.php
+++ b/htdocs/compta/sociales/list.php
@@ -713,16 +713,35 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++;
}
- print '';
+ print ''."\n";
+
$i++;
}
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
-print '';
-print '';
-print '';
+// If no record found
+if ($num == 0) {
+ $colspan = 1;
+ foreach ($arrayfields as $key => $val) {
+ if (!empty($val['checked'])) {
+ $colspan++;
+ }
+ }
+ print '
'.$langs->trans("NoRecordFound").'
';
+}
+
+$db->free($resql);
+
+$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
+$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+
+print ''."\n";
+print ''."\n";
+
+print ''."\n";
// End of page
llxFooter();
diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php
index f1731420852..5f76b2e9190 100644
--- a/htdocs/compta/tva/list.php
+++ b/htdocs/compta/tva/list.php
@@ -190,8 +190,8 @@ $sql .= $db->order($sortfield, $sortorder);
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
- $result = $db->query($sql);
- $nbtotalofrecords = $db->num_rows($result);
+ $resql = $db->query($sql);
+ $nbtotalofrecords = $db->num_rows($resql);
// if total resultset is smaller then paging size (filtering), goto and load page 0
if (($page * $limit) > $nbtotalofrecords) {
@@ -202,15 +202,15 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$sql .= $db->plimit($limit + 1, $offset);
-$result = $db->query($sql);
-if (!$result) {
+$resql = $db->query($sql);
+if (!$resql) {
dol_print_error($db);
llxFooter();
$db->close();
exit;
}
-$num = $db->num_rows($result);
+$num = $db->num_rows($resql);
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER['PHP_SELF']) {
@@ -429,7 +429,7 @@ print '';
$i = 0;
$totalarray = array();
while ($i < min($num, $limit)) {
- $obj = $db->fetch_object($result);
+ $obj = $db->fetch_object($resql);
$tva_static->id = $obj->rowid;
$tva_static->ref = $obj->rowid;
@@ -549,11 +549,27 @@ $totalarray['nbfield']++;
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
-print '';
-print '';
-print '';
+// If no record found
+if ($num == 0) {
+ $colspan = 1;
+ foreach ($arrayfields as $key => $val) {
+ if (!empty($val['checked'])) {
+ $colspan++;
+ }
+ }
+ print '
'.$langs->trans("NoRecordFound").'
';
+}
-$db->free($result);
+$db->free($resql);
+
+$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
+$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+
+print ''."\n";
+print ''."\n";
+
+print ''."\n";
// End of page
llxFooter();
diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php
index 631bf932640..02813cee469 100644
--- a/htdocs/contact/consumption.php
+++ b/htdocs/contact/consumption.php
@@ -355,7 +355,7 @@ if (empty($elementTypeArray) && !$object->thirdparty->client && !$object->thirdp
// Define type of elements
$typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), $showempty, 0, 0, '', 0, 0, $disabled, '', 'maxwidth150onsmartphone');
-$button = '';
+$button = '';
$param = '';
$param .= "&sref=".urlencode($sref);
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 31b2153c2c8..93d61f8a903 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -1309,19 +1309,31 @@ while ($i < min($num, $limit)) {
$i++;
}
+// Show total line
+include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
+
+// If no record found
+if ($num == 0) {
+ $colspan = 1;
+ foreach ($arrayfields as $key => $val) {
+ if (!empty($val['checked'])) {
+ $colspan++;
+ }
+ }
+ print '
'.$langs->trans("NoRecordFound").'
';
+}
+
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
-print "";
-print "";
-
-//if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies.png', 0, '', '', $limit, 1);
-
-print '';
+print ''."\n";
+print ''."\n";
+print ''."\n";
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 8771ad0f9b6..9638eb4ce7f 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -811,7 +811,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
-$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
+$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print ''."\n";
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 746b4dc0db0..e7b9e5097ea 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -863,9 +863,6 @@ $arrayofmassactions = array(
// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
);
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
-if ($user->rights->societe->supprimer) {
- $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
-}
if ($user->rights->societe->creer) {
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
}
@@ -881,6 +878,9 @@ if ($user->rights->societe->creer) {
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'preenable', 'preclose'))) {
$arrayofmassactions = array();
}
+if ($user->rights->societe->supprimer) {
+ $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
+}
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$typefilter = '';