Debug v20
This commit is contained in:
parent
7945e3800c
commit
a8872ea4aa
1 changed files with 13 additions and 3 deletions
|
|
@ -1328,8 +1328,10 @@ if ($resql) {
|
|||
$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);
|
||||
|
|
@ -1396,14 +1398,22 @@ if ($resql) {
|
|||
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>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue