print '<td width="50">&nbsp;</td>';
 print '</tr>';
 $var = true;
 $i = 0;
 $num = $db->num_rows($resql);
 while ($i < $num) {
     $obj = $db->fetch_object($resql);
     $var = !$var;
     print "<tr " . $bc[$var] . ">";
     print '<td>' . dol_print_date($db->jdate($obj->dc), 'dayhour') . '</td>';
     if ($obj->description == '(CREDIT_NOTE)') {
         print '<td class="nowrap">';
         $facturestatic->id = $obj->fk_facture_source;
         $facturestatic->ref = $obj->ref;
         $facturestatic->type = $obj->type;
         print $langs->trans("CreditNote") . ' ' . $facturestatic->getNomURl(1);
         print '</td>';
     } elseif ($obj->description == '(DEPOSIT)') {
         print '<td class="nowrap">';
         $facturestatic->id = $obj->fk_facture_source;
         $facturestatic->ref = $obj->ref;
         $facturestatic->type = $obj->type;
         print $langs->trans("InvoiceDeposit") . ' ' . $facturestatic->getNomURl(1);
         print '</td>';
     } else {
         print '<td>';
         print $obj->description;
         print '</td>';
     }
     print '<td class="nowrap">' . $langs->trans("NotConsumed") . '</td>';
     print '<td align="right">' . price($obj->amount_ht) . '</td>';