Skip to content

Commit

Permalink
Merge pull request #5123 from fmarcet/3.9
Browse files Browse the repository at this point in the history
FIX: Not filtering correctly when coming from dashboard
  • Loading branch information
eldy committed Apr 29, 2016
2 parents 3c2c9a2 + 33499ae commit 9a1cff9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htdocs/compta/bank/class/account.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -986,6 +987,7 @@ public static function countAccountToReconcile()
$sql = "SELECT COUNT(ba.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= " WHERE ba.rappro > 0 and ba.clos = 0";
$sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")";
if (empty($conf->global->BANK_CAN_RECONCILIATE_CASHACCOUNT)) $sql.= " AND ba.courant != 2";
$resql=$db->query($sql);
if ($resql)
Expand Down
9 changes: 9 additions & 0 deletions htdocs/fourn/facture/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,15 @@
{
$sql.= " AND fac.fk_statut = ".$search_status;
}
if ($filter && $filter != -1)
{
$aFilter = explode(',', $filter);
foreach ($aFilter as $fil)
{
$filt = explode(':', $fil);
$sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]);
}
}

$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
Expand Down

0 comments on commit 9a1cff9

Please sign in to comment.