diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 384b88655f6..89ca2513ab2 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -161,10 +161,18 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { if ($num > 0) { $i = 0; + $othernb = 0; - while ($i < $nbofloop) { + while ($i < $num && $i < $conf->liste_limit) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); + continue; + } + $propalstatic->id = $obj->rowid; $propalstatic->ref = $obj->ref; $propalstatic->ref_client = $obj->ref_client; @@ -196,6 +204,15 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { $i++; $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); } + + if ($othernb) { + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + } addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal"); @@ -236,10 +253,18 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa if ($num > 0) { $i = 0; + $othernb = 0; - while ($i < $nbofloop) { + while ($i < $num && $i < $conf->liste_limit) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); + continue; + } + $supplierproposalstatic->id = $obj->rowid; $supplierproposalstatic->ref = $obj->ref; $supplierproposalstatic->total_ht = $obj->total_ht; @@ -270,6 +295,15 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa $i++; $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); } + + if ($othernb) { + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + } addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal"); @@ -310,10 +344,18 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { if ($num > 0) { $i = 0; + $othernb = 0; - while ($i < $nbofloop) { + while ($i < $num && $i < $conf->liste_limit) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); + continue; + } + $orderstatic->id = $obj->rowid; $orderstatic->ref = $obj->ref; $orderstatic->ref_client = $obj->ref_client; @@ -345,6 +387,15 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { $i++; $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); } + + if ($othernb) { + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + } addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal"); @@ -385,10 +436,18 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU if ($num > 0) { $i = 0; + $othernb = 0; - while ($i < $nbofloop) { + while ($i < $num && $i < $conf->liste_limit) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); + continue; + } + $supplierorderstatic->id = $obj->rowid; $supplierorderstatic->ref = $obj->ref; $supplierorderstatic->ref_supplier = $obj->ref_suppliert; @@ -420,6 +479,15 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $i++; $total += (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc); } + + if ($othernb) { + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + } addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal"); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 1d4d1a37354..5f5da8f83d9 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -193,11 +193,19 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $companystatic = new Societe($db); $i = 0; + $othernb = 0; $tot_ttc = 0; - while ($i < $num) + while ($i < $num && $i < $conf->liste_limit) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $tot_ttc += $obj->total_ttc; + continue; + } + $tmpinvoice->id = $obj->rowid; $tmpinvoice->ref = $obj->ref; $tmpinvoice->date = $db->jdate($obj->date); @@ -232,6 +240,14 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $i++; } + if ($othernb) { + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + print ''.$langs->trans("Total").''; print ''.price($tot_ttc).''; print ''; @@ -290,11 +306,19 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $companystatic = new Societe($db); $i = 0; + $othernb = 0; $tot_ttc = 0; - while ($i < $num) + while ($i < $num && $i < $conf->liste_limit) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $tot_ttc += $obj->total_ttc; + continue; + } + $facturesupplierstatic->ref = $obj->ref; $facturesupplierstatic->id = $obj->rowid; $facturesupplierstatic->total_ht = $obj->total_ht; @@ -328,6 +352,14 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $i++; } + if ($othernb) { + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + print ''.$langs->trans("Total").''; print ''.price($tot_ttc).''; print '';