Dans les commandes à facturer, on n'affiche que les commandes ayant un montant restant à facturer > 0

This commit is contained in:
tipaul 2005-05-25 11:58:02 +00:00
parent 14c86ba13f
commit 56e4d57fac

View File

@ -272,20 +272,22 @@ if ($conf->commande->enabled && $user->rights->commande->lire)
$tot_ttc=0; $tot_ttc=0;
while ($i < $num) while ($i < $num)
{ {
$var=!$var;
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print "<tr $bc[$var]>"; if ($obj->total_ttc-$obj->tot_fttc >0) {
print "<td width=\"20%\"><a href=\"commande/fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order").'</a>&nbsp;'; $var=!$var;
print "<a href=\"commande/fiche.php?id=$obj->rowid\">".$obj->ref.'</a></td>'; print "<tr $bc[$var]>";
print "<td width=\"20%\"><a href=\"commande/fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order").'</a>&nbsp;';
print "<a href=\"commande/fiche.php?id=$obj->rowid\">".$obj->ref.'</a></td>';
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("ShowCompany"),"company").'</a>&nbsp;'; print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("ShowCompany"),"company").'</a>&nbsp;';
print '<a href="fiche.php?socid='.$obj->idp.'">'.dolibarr_trunc($obj->nom,50).'</a></td>'; print '<a href="fiche.php?socid='.$obj->idp.'">'.dolibarr_trunc($obj->nom,50).'</a></td>';
print '<td align="right">'.price($obj->total_ht).'</td>'; print '<td align="right">'.price($obj->total_ht).'</td>';
print '<td align="right">'.price($obj->total_ttc).'</td>'; print '<td align="right">'.price($obj->total_ttc).'</td>';
print '<td align="right">'.price($obj->total_ttc-$obj->tot_fttc).'</td></tr>'; print '<td align="right">'.price($obj->total_ttc-$obj->tot_fttc).'</td></tr>';
$tot_ht += $obj->total_ht; $tot_ht += $obj->total_ht;
$tot_ttc += $obj->total_ttc; $tot_ttc += $obj->total_ttc;
$tot_tobill += ($obj->total_ttc-$obj->tot_fttc); $tot_tobill += ($obj->total_ttc-$obj->tot_fttc);
}
$i++; $i++;
} }
$var=!$var; $var=!$var;