';
print '';
- print '| '.$langs->trans("ProposalsDraft").($num?' '.$num.'':'').' |
';
+ print ''.$langs->trans("ProposalsDraft").' '.$num.' | ';
if ($num > 0)
{
$i = 0;
- while ($i < $num)
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ while ($i < $nbofloop)
{
$obj = $db->fetch_object($resql);
@@ -190,10 +191,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
$i++;
$total += $obj->total_ht;
}
- if ($total>0)
+ if ($num > $nbofloop)
{
-
- print '| '.$langs->trans("Total").' | '.price($total)." |
";
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ }
+ elseif ($total>0)
+ {
+ print '| '.$langs->trans("Total").' | '.price($total)." |
";
}
}
else
@@ -245,7 +249,8 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
if ($num > 0)
{
$i = 0;
- while ($i < $num)
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ while ($i < $nbofloop)
{
$obj = $db->fetch_object($resql);
@@ -270,9 +275,13 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
$i++;
$total += $obj->total_ht;
}
- if ($total>0)
+ if ($num > $nbofloop)
+ {
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ }
+ elseif ($total>0)
{
- print '| '.$langs->trans("Total").' | '.price($total)." |
";
+ print '| '.$langs->trans("Total").' | '.price($total)." |
";
}
}
else
@@ -322,9 +331,9 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
if ($num > 0)
{
$i = 0;
- while ($i < $num)
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ while ($i < $nbofloop)
{
-
$obj = $db->fetch_object($resql);
print '| ';
$orderstatic->id=$obj->rowid;
@@ -353,10 +362,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
$i++;
$total += $obj->total_ttc;
}
- if ($total>0)
+ if ($num > $nbofloop)
{
-
- print ' |
| '.$langs->trans("Total").' | '.price($total)." |
";
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ }
+ elseif ($total>0)
+ {
+ print '| '.$langs->trans("Total").' | '.price($total)." |
";
}
}
else
@@ -409,7 +421,8 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
if ($num > 0)
{
$i = 0;
- while ($i < $num)
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ while ($i < $nbofloop)
{
$obj = $db->fetch_object($resql);
@@ -440,10 +453,13 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
$i++;
$total += $obj->total_ttc;
}
- if ($total>0)
+ if ($num > $nbofloop)
+ {
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ }
+ elseif ($total>0)
{
-
- print '| '.$langs->trans("Total").' | '.price($total)." |
";
+ print '| '.$langs->trans("Total").' | '.price($total)." |
";
}
}
else
@@ -700,7 +716,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
print '';
print '| '.$langs->trans("ProposalsOpened").' '.$num.' |
';
- $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
{
$obj = $db->fetch_object($result);
@@ -757,11 +773,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
}
if ($num > $nbofloop)
{
- print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
}
elseif ($total>0)
{
- print '| '.$langs->trans("Total")." | ".price($total)." | |
";
+ print '| '.$langs->trans("Total")." | ".price($total)." | |
";
}
print "
";
print "
";
@@ -804,7 +820,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
print '';
print '| '.$langs->trans("OrdersOpened").' '.$num.' |
';
- $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
{
$obj = $db->fetch_object($result);
@@ -861,11 +877,11 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
}
if ($num > $nbofloop)
{
- print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
}
elseif ($total>0)
{
- print '| '.$langs->trans("Total")." | ".price($total)." | |
";
+ print '| '.$langs->trans("Total")." | ".price($total)." | |
";
}
print "
";
print "
";
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index 2bc710394bb..55145381951 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -172,16 +172,18 @@ if (! empty($conf->propal->enabled))
$resql=$db->query($sql);
if ($resql)
{
- print '';
- print '
';
- print '';
- print '| '.$langs->trans("DraftPropals").' |
';
- $langs->load("propal");
$num = $db->num_rows($resql);
if ($num)
{
+ print '';
+ print '
';
+ print '';
+ $langs->load("propal");
+ print '| '.$langs->trans("DraftPropals").' '.$num.' |
';
+
$i = 0;
- while ($i < $num)
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ while ($i < $nbofloop)
{
$obj = $db->fetch_object($resql);
print '';
@@ -199,9 +201,17 @@ if (! empty($conf->propal->enabled))
print '
';
$i++;
}
+ if ($num > $nbofloop)
+ {
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ }
+ elseif ($total>0)
+ {
+ print '| '.$langs->trans("Total").' | '.price($total)." |
";
+ }
+ print "
";
+ print "
";
}
- print "
";
- print "
";
}
}
@@ -320,7 +330,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
print '';
print '| '.$langs->trans("ProposalsOpened").' '.$num.' |
';
- $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
{
$obj = $db->fetch_object($result);
@@ -365,11 +375,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
}
if ($num > $nbofloop)
{
- print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
+ print '| '.$langs->trans("XMoreLines", ($num - $nbofloop))." |
";
}
elseif ($total>0)
{
- print '| '.$langs->trans("Total")." | ".price($total)." | |
";
+ print '| '.$langs->trans("Total")." | ".price($total)." | |
";
}
print "
";
print "
";