diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 8adbfb1fcb5..15d20b333f4 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -81,6 +81,8 @@ $req_enddtday=GETPOST('req_enddtday', 'int'); $req_enddtyear=GETPOST('req_enddtyear', 'int'); $req_enddt = dol_mktime(23, 59, 59, $req_enddtmonth, $req_enddtday, $req_enddtyear); +$search_reconciled = GETPOST('search_reconciled'); + $vline=GETPOST("vline"); $page=GETPOST('page','int'); $negpage=GETPOST('negpage','int'); @@ -108,6 +110,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $req_enddtday=""; $req_enddtyear=""; $req_enddt = ""; + $search_reconciled = ''; } /* @@ -281,6 +284,8 @@ if ($id > 0 || ! empty($ref)) $mode_search = 1; } + if ($search_reconciled == 'reconciled') $sql_rech.=" AND num_releve IS NOT NULL"; + if ($search_reconciled == 'notreconciled') $sql_rech.=" AND num_releve IS NULL"; $sql = "SELECT count(*) as total"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; @@ -294,7 +299,8 @@ if ($id > 0 || ! empty($ref)) $sql.= " AND b.fk_account = ba.rowid"; $sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")"; $sql.= $sql_rech; - + print $sql; + dol_syslog("account.php count transactions -", LOG_DEBUG); $result=$db->query($sql); if ($result) @@ -492,6 +498,11 @@ if ($id > 0 || ! empty($ref)) * Show list of bank transactions */ + print '