diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 9747703c58fbfba6577200ab84e1c8e400e9fe3f..7058647fae6ab14bfc04d89b00234c45764915a2 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -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 @@ -986,6 +987,7 @@ class Account extends CommonObject $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)