diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 9ebb2ee11b3..af9d626ef00 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -719,11 +719,11 @@ if ($account || $_GET["ref"]) { print '
'; - if ($acct->type != 2 && $acct->rappro) // Si non compte cash et rapprochable + if ($acct->type != 2 && $acct->rappro) // If not cash account and can be reconciliate { if ($user->rights->banque->consolidate) { - print ''.$langs->trans("Conciliate").''; + print ''.$langs->trans("Conciliate").''; } else { diff --git a/htdocs/compta/bank/pre.inc.php b/htdocs/compta/bank/pre.inc.php index 4e8fddf392a..c653d399646 100644 --- a/htdocs/compta/bank/pre.inc.php +++ b/htdocs/compta/bank/pre.inc.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copytight (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -56,7 +56,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0 // Entry for each bank account if ($user->rights->banque->lire) { - $sql = "SELECT rowid, label, courant"; + $sql = "SELECT rowid, label, courant, rappro, courant"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " WHERE entity = ".$conf->entity; $sql.= " AND clos = 0"; @@ -73,6 +73,10 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0 { $objp = $db->fetch_object($resql); $menu->add_submenu(DOL_URL_ROOT."/compta/bank/fiche.php?id=".$objp->rowid,$objp->label,1,$user->rights->banque->lire); + if ($objp->rappro && $objp->courant != 2) // If not cash account and can be reconciliate + { + $menu->add_submenu(DOL_URL_ROOT.'/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate); + } /* $menu->add_submenu(DOL_URL_ROOT."/compta/bank/annuel.php?account=".$objp->rowid ,$langs->trans("IOMonthlyReporting")); $menu->add_submenu(DOL_URL_ROOT."/compta/bank/graph.php?account=".$objp->rowid ,$langs->trans("Graph")); @@ -81,6 +85,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0 $i++; } } + else dol_print_error($db); $db->free($resql); } diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index 993abc655cd..ed5b2699602 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -143,15 +143,14 @@ if ($resql) $var=True; $num = $db->num_rows($resql); - print_titre($langs->trans("Reconciliation").': '.$acct->label.''); + print_fiche_titre($langs->trans("Reconciliation").': '.$acct->label.''); print '
'; if ($mesg) print $mesg."
"; - // Affiche nom des derniers releves + // Show last bank receipts $nbmax=5; $liste=""; - $sql = "SELECT distinct num_releve FROM ".MAIN_DB_PREFIX."bank"; $sql.= " WHERE fk_account=".$_GET["account"]; $sql.= " ORDER BY num_releve DESC"; @@ -169,9 +168,9 @@ if ($resql) $i++; $liste=''.$objr->num_releve.'   '.$liste; } - if ($num >= $nbmax) $liste="...   ".$liste; + if ($numr >= $nbmax) $liste="...   ".$liste; print $liste; - if ($num > 0) print '

'; + if ($numr > 0) print '

'; else print $langs->trans("None").'

'; } else