From 6184c71181516fcab3aff7b372e08b342a48fa5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 5 Mar 2016 14:05:00 +0100 Subject: [PATCH] Corrected comparison of Account::canBeConciliated output --- htdocs/compta/bank/account.php | 19 +++++++++---------- htdocs/compta/bank/releve.php | 13 +++++-------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 80bf481e859..611b41eccf1 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -397,15 +397,11 @@ if ($id > 0 || ! empty($ref)) } } - if ($object->canBeConciliated()) - { + if ($object->canBeConciliated() > 0) { // If not cash account and can be reconciliate - if ($user->rights->banque->consolidate) - { - print ''.$langs->trans("Conciliate").''; - } - else - { + if ($user->rights->banque->consolidate) { + print ''.$langs->trans("Conciliate").''; + } else { print ''.$langs->trans("Conciliate").''; } } @@ -529,8 +525,11 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("Credit").''; print ''.$langs->trans("BankBalance").''; print ''; - if ($object->canBeConciliated()) print $langs->trans("AccountStatementShort"); - else print ' '; + if ($object->canBeConciliated() > 0) { + print $langs->trans("AccountStatementShort"); + } else { + print ' '; + } print ''; print '
'; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 4b4b9d4707b..8ef53f26203 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -143,15 +143,12 @@ if (empty($num)) dol_fiche_end(); print '
'; - - if ($object->canBeConciliated()) { + + if ($object->canBeConciliated() > 0) { // If not cash account and can be reconciliate - if ($user->rights->banque->consolidate) - { - print ''.$langs->trans("Conciliate").''; - } - else - { + if ($user->rights->banque->consolidate) { + print ''.$langs->trans("Conciliate").''; + } else { print ''.$langs->trans("Conciliate").''; } }