Merge pull request #10802 from altatof/propindex
Harmonize propal index pages
This commit is contained in:
commit
de554750e4
@ -159,12 +159,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
@ -190,10 +191,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total += $obj->total_ht;
|
||||||
}
|
}
|
||||||
if ($total>0)
|
if ($num > $nbofloop)
|
||||||
{
|
{
|
||||||
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
}
|
||||||
|
elseif ($total>0)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td colspan="2" class="right">'.$langs->trans("Total").'</td><td class="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -245,7 +249,8 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
|
|||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
@ -270,9 +275,13 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total += $obj->total_ht;
|
||||||
}
|
}
|
||||||
if ($total>0)
|
if ($num > $nbofloop)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
|
}
|
||||||
|
elseif ($total>0)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -322,9 +331,9 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
|
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print '<tr class="oddeven"><td class="nowrap">';
|
print '<tr class="oddeven"><td class="nowrap">';
|
||||||
$orderstatic->id=$obj->rowid;
|
$orderstatic->id=$obj->rowid;
|
||||||
@ -353,10 +362,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
if ($total>0)
|
if ($num > $nbofloop)
|
||||||
{
|
{
|
||||||
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
}
|
||||||
|
elseif ($total>0)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -409,7 +421,8 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
|
|||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
|
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -440,10 +453,13 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
if ($total>0)
|
if ($num > $nbofloop)
|
||||||
{
|
{
|
||||||
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
}
|
||||||
|
elseif ($total>0)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -757,11 +773,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
}
|
}
|
||||||
if ($num > $nbofloop)
|
if ($num > $nbofloop)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
print '<tr class="liste_total"><td colspan="5" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
}
|
}
|
||||||
elseif ($total>0)
|
elseif ($total>0)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print "</div><br>";
|
print "</div><br>";
|
||||||
@ -861,11 +877,11 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
}
|
}
|
||||||
if ($num > $nbofloop)
|
if ($num > $nbofloop)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
print '<tr class="liste_total"><td colspan="5" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
}
|
}
|
||||||
elseif ($total>0)
|
elseif ($total>0)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print "</div><br>";
|
print "</div><br>";
|
||||||
|
|||||||
@ -172,16 +172,18 @@ if (! empty($conf->propal->enabled))
|
|||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
print '<div class="div-table-responsive-no-min">';
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td colspan="2">'.$langs->trans("DraftPropals").'</td></tr>';
|
|
||||||
$langs->load("propal");
|
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
$langs->load("propal");
|
||||||
|
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -199,11 +201,19 @@ if (! empty($conf->propal->enabled))
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
if ($num > $nbofloop)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td colspan="2" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
|
}
|
||||||
|
elseif ($total>0)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td class="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print "</div><br>";
|
print "</div><br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
@ -365,11 +375,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
}
|
}
|
||||||
if ($num > $nbofloop)
|
if ($num > $nbofloop)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
print '<tr class="liste_total"><td colspan="5" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
}
|
}
|
||||||
elseif ($total>0)
|
elseif ($total>0)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print "</div><br>";
|
print "</div><br>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user