FIX Field balance before and after sometimes not visible in bank entries
This commit is contained in:
parent
de74c447cc
commit
018cfdf54b
@ -108,14 +108,6 @@ $pagenext = $page + 1;
|
||||
if (!$sortorder) $sortorder = 'desc,desc,desc';
|
||||
if (!$sortfield) $sortfield = 'b.datev,b.dateo,b.rowid';
|
||||
|
||||
$mode_balance_ok = false;
|
||||
//if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) // TODO Manage balance when account not selected
|
||||
if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid'))
|
||||
{
|
||||
$sortfield = 'b.datev,b.dateo,b.rowid';
|
||||
if ($id > 0 || !empty($ref) || $search_account > 0) $mode_balance_ok = true;
|
||||
}
|
||||
|
||||
$object = new Account($db);
|
||||
if ($id > 0 || !empty($ref))
|
||||
{
|
||||
@ -130,6 +122,13 @@ if ($id > 0 || !empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
$mode_balance_ok = false;
|
||||
//if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) // TODO Manage balance when account not selected
|
||||
if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid'))
|
||||
{
|
||||
$sortfield = 'b.datev,b.dateo,b.rowid';
|
||||
if ($id > 0 || !empty($ref) || $search_account > 0) $mode_balance_ok = true;
|
||||
}
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('banktransactionlist', $contextpage));
|
||||
@ -574,6 +573,7 @@ if ($page >= $nbtotalofpages)
|
||||
if ($page < 0) $page = 0;
|
||||
}
|
||||
|
||||
|
||||
// If not account defined $mode_balance_ok=false
|
||||
if (empty($search_account)) $mode_balance_ok = false;
|
||||
// If a search is done $mode_balance_ok=false
|
||||
@ -583,7 +583,7 @@ if (!empty($search_type)) $mode_balance_ok = false;
|
||||
if (!empty($search_debit)) $mode_balance_ok = false;
|
||||
if (!empty($search_credit)) $mode_balance_ok = false;
|
||||
if (!empty($search_thirdparty)) $mode_balance_ok = false;
|
||||
if ($search_conciliated != '') $mode_balance_ok = false;
|
||||
if ($search_conciliated != '' && $search_conciliated != '-1') $mode_balance_ok = false;
|
||||
if (!empty($search_num_releve)) $mode_balance_ok = false;
|
||||
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user