2
0
forked from Wavyzz/dolibarr

Do not show qty 0 is zero.

This commit is contained in:
Laurent Destailleur
2024-10-17 13:37:23 +02:00
parent 03fa3aebd9
commit d97ff764ab

View File

@@ -6451,7 +6451,7 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '',
print '<td class="nobordernopadding valignmiddle col-title">';
print '<div class="titre inline-block">';
print '<span class="inline-block valignmiddle print-barre-liste">'.$title.'</span>'; // $title may contains HTML like a combo list from page consumption.php, so we do not use dolPrintLabel here()
if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') {
if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '' && $totalnboflines > 0) {
print '<span class="opacitymedium colorblack marginleftonly totalnboflines valignmiddle" title="'.$langs->trans("NbRecordQualified").'">('.$totalnboflines.')</span>';
}
print '</div></td>';
@@ -6584,8 +6584,9 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
if (empty($hidenavigation)) {
if ((int) $limit > 0 && (empty($selectlimitsuffix) || !is_numeric($selectlimitsuffix))) {
$pagesizechoices = '10:10,15:15,20:20,25:25,50:50,100:100,250:250,500:500,1000:1000';
$pagesizechoices .= ',5000:5000,10000:10000';
//$pagesizechoices .= ',20000:20000'; // Memory trouble on browsers
$pagesizechoices .= ',5000:5000';
//$pagesizechoices .= ',10000:10000'; // Memory trouble on most browsers
//$pagesizechoices .= ',20000:20000'; // Memory trouble on most browsers
//$pagesizechoices .= ',0:'.$langs->trans("All"); // Not yet supported
//$pagesizechoices .= ',2:2';
if (getDolGlobalString('MAIN_PAGESIZE_CHOICES')) {
@@ -6603,11 +6604,11 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
$tmpchoice = explode(',', $pagesizechoices);
$tmpkey = $limit.':'.$limit;
if (!in_array($tmpkey, $tmpchoice)) {
$tmpchoice[] = $tmpkey;
$tmpchoice[$tmpkey] = $tmpkey;
}
$tmpkey = $conf->liste_limit.':'.$conf->liste_limit;
if (!in_array($tmpkey, $tmpchoice)) {
$tmpchoice[] = $tmpkey;
$tmpchoice[$tmpkey] = $tmpkey;
}
asort($tmpchoice, SORT_NUMERIC);
foreach ($tmpchoice as $val) {