Skip to content

Commit

Permalink
Debug v20
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 2, 2024
1 parent 7945e38 commit a8872ea
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions htdocs/compta/bank/bankentries_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,10 @@
$sqlforbalance .= " WHERE b.fk_account = ba.rowid";
$sqlforbalance .= " AND ba.entity IN (".getEntity('bank_account').")";
$sqlforbalance .= " AND b.fk_account = ".((int) $search_account);
// To limit record on the page
$sqlforbalance .= " AND (b.datev < '".$db->idate($db->jdate($objp->dv))."' OR (b.datev = '".$db->idate($db->jdate($objp->dv))."' AND (b.dateo < '".$db->idate($db->jdate($objp->do))."' OR (b.dateo = '".$db->idate($db->jdate($objp->do))."' AND b.rowid < ".$objp->rowid."))))";
$resqlforbalance = $db->query($sqlforbalance);

//print $sqlforbalance;
if ($resqlforbalance) {
$objforbalance = $db->fetch_object($resqlforbalance);
Expand Down Expand Up @@ -1396,14 +1398,22 @@
if (!empty($arrayfields['balancebefore']['checked'])) {
print '<td class="right">';
if ($search_conciliated !== '0') {
print price(price2num($balance, 'MT'), 1, $langs);
if ($sortfield == 'b.datev,b.dateo,b.rowid' && ($sortorder == 'desc' || $sortorder == 'desc,desc' || $sortorder == 'desc,desc,desc')) {
print price(price2num($balancebefore, 'MT'), 1, $langs);
} else {
print price(price2num($balance, 'MT'), 1, $langs);
}
}
print '</td>';
}
if (!empty($arrayfields['balance']['checked'])) {
print '<td class="right">';
if ($search_conciliated !== '0') {
print price(price2num($balance, 'MT'), 1, $langs);
if ($search_conciliated !== '0') { // If not filter of filter on "conciliated"
if ($sortfield == 'b.datev,b.dateo,b.rowid' && ($sortorder == 'desc' || $sortorder == 'desc,desc' || $sortorder == 'desc,desc,desc')) {
print price(price2num($balancebefore, 'MT'), 1, $langs);
} else {
print price(price2num($balance, 'MT'), 1, $langs);
}
}
print '</td>';
}
Expand Down

0 comments on commit a8872ea

Please sign in to comment.