Skip to content

Commit

Permalink
Debug v20
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 1, 2024
1 parent 5302fee commit 6635b33
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions htdocs/compta/bank/releve.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@
$balancestart = array();
$content = array();

while ($i < min($numrows, $conf->liste_limit)) {
$max = min($numrows, $conf->liste_limit);
while ($i < $max) {
$objp = $db->fetch_object($resql);

if (!isset($objp->numr)) {
Expand All @@ -384,11 +385,11 @@
$sql .= " WHERE b.num_releve < '".$db->escape($objp->numr)."'";
$sql .= " AND b.num_releve <> ''";
$sql .= " AND b.fk_account = ".((int) $object->id);
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
$resqlstart = $db->query($sql);
if ($resqlstart) {
$obj = $db->fetch_object($resqlstart);
$balancestart[$objp->numr] = $obj->amount;
$db->free($resql);
$db->free($resqlstart);
}
print '<td class="right"><span class="amount">'.price($balancestart[$objp->numr], 0, $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).'</span></td>';

Expand All @@ -397,11 +398,11 @@
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql .= " WHERE b.num_releve = '".$db->escape($objp->numr)."'";
$sql .= " AND b.fk_account = ".((int) $object->id);
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
$resqlend = $db->query($sql);
if ($resqlend) {
$obj = $db->fetch_object($resqlend);
$content[$objp->numr] = $obj->amount;
$db->free($resql);
$db->free($resqlend);
}
print '<td class="right"><span class="amount">'.price(($balancestart[$objp->numr] + $content[$objp->numr]), 0, $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).'</span></td>';

Expand All @@ -413,6 +414,7 @@

print '</tr>'."\n";
}

$i++;
}

Expand Down

0 comments on commit 6635b33

Please sign in to comment.