307 |
$result = $db->query($sql); |
$result = $db->query($sql); |
308 |
if ($result) |
if ($result) |
309 |
{ |
{ |
310 |
_print_lines($db, $result, $sql, $acct); |
$total = _print_lines($db, $result, $sql, $acct); |
311 |
|
if ($page == 0) |
312 |
|
{ |
313 |
|
print '<tr class="liste_total"><td align="right" colspan="6">'.$langs->trans("Balance").'</td>'; |
314 |
|
print '<td align="right" nowrap>'.price($total).'</td>'; |
315 |
|
print '<td> </td>'; |
316 |
|
print '</tr>'; |
317 |
|
} |
318 |
$db->free($result); |
$db->free($result); |
319 |
} |
} |
320 |
|
|
355 |
llxFooter('$Date$ - $Revision$'); |
llxFooter('$Date$ - $Revision$'); |
356 |
|
|
357 |
|
|
358 |
/* |
/** |
359 |
* |
* \brief Affiche ligne ecriture |
360 |
|
* \param db Handler d'accès base |
361 |
|
* \param result Resultset du select |
362 |
|
* \param sql Requete sql |
363 |
|
* \param acct Compte |
364 |
|
* \return Renvoi total solde |
365 |
*/ |
*/ |
366 |
function _print_lines($db,$result,$sql,$acct) |
function _print_lines($db,$result,$sql,$acct) |
367 |
{ |
{ |
368 |
global $bc, $nbline, $viewline, $user, $page; |
global $bc, $nbline, $viewline, $user, $page; |
369 |
$var=True; |
|
370 |
|
$var=true; |
371 |
|
$total=0; |
372 |
|
|
373 |
$num = $db->num_rows($result); |
$num = $db->num_rows($result); |
374 |
$i = 0; $total = 0; $sep = 0; |
$i = 0; $total = 0; $sep = 0; |
375 |
|
|
396 |
print "<td nowrap> ".dolibarr_print_date($objp->dv,"%d/%m/%y")."</td>\n"; |
print "<td nowrap> ".dolibarr_print_date($objp->dv,"%d/%m/%y")."</td>\n"; |
397 |
print "<td nowrap> ".$objp->fk_type." ".($objp->num_chq?$objp->num_chq:"")."</td>\n"; |
print "<td nowrap> ".$objp->fk_type." ".($objp->num_chq?$objp->num_chq:"")."</td>\n"; |
398 |
print "<td><a href=\"ligne.php?rowid=$objp->rowid&account=$acct->id\">$objp->label</a>"; |
print "<td><a href=\"ligne.php?rowid=$objp->rowid&account=$acct->id\">$objp->label</a>"; |
399 |
|
|
400 |
/* |
/* |
401 |
* Ajout les liens |
* Ajout les liens |
402 |
*/ |
*/ |
467 |
$i++; |
$i++; |
468 |
} |
} |
469 |
|
|
470 |
|
return $total; |
471 |
} |
} |
472 |
?> |
?> |