diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index df9f5345a80..835d5f14035 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -30,7 +30,7 @@
require("./pre.inc.php");
-if (!$user->rights->banque->modifier && !$user->rights->banque->consolidate)
+if (! $user->rights->banque->lire && ! $user->rights->banque->consolidate)
accessforbidden();
$langs->load("banks");
@@ -265,7 +265,7 @@ if ($result)
// Date ope
print '
| '.$langs->trans("DateOperation").' | ';
- if (! $objp->rappro)
+ if (! $objp->rappro && $user->rights->banque->modifier)
{
print '';
$html->select_date($objp->do,'dateo','','','','update');
@@ -280,7 +280,7 @@ if ($result)
// Value date
print " |
| ".$langs->trans("DateValue")." | ";
- if (! $objp->rappro)
+ if (! $objp->rappro && $user->rights->banque->modifier)
{
print '';
$html->select_date($objp->dv,'datev','','','','update');
@@ -300,7 +300,7 @@ if ($result)
// Description
print " |
| ".$langs->trans("Label")." | ";
- if (! $objp->rappro)
+ if (! $objp->rappro && $user->rights->banque->modifier)
{
print '';
print ' | ".$langs->trans("Amount")." | ";
- if (! $objp->rappro)
+ if (! $objp->rappro && $user->rights->banque->modifier)
{
print '';
print ' '.$langs->trans("Currency".$conf->monnaie);
@@ -410,33 +410,54 @@ if ($result)
// Type paiement
print " |
| ".$langs->trans("Type")." / ".$langs->trans("Numero")." | ";
- print " | ';
- print "";
+ if ($user->rights->banque->modifier)
+ {
+ print " | ';
+ print "";
+ }
+ else
+ {
+ print $objp->fk_type.' '.$objp->num_chq.' | | ';
+ }
print "
";
// Banque
print "| ".$langs->trans("Bank")." | ";
- print " | ';
- print "";
+ if ($user->rights->banque->modifier)
+ {
+ print " | ';
+ print "";
+ }
+ else
+ {
+ print $objp->banque.' | | ';
+ }
print "
";
// Emetteur
print "| ".$langs->trans("CheckTransmitter")." | ";
- print " | ';
- print "";
+ if ($user->rights->banque->modifier)
+ {
+ print " | ';
+ print "";
+ }
+ else
+ {
+ print $objp->emetteur.' | | ';
+ }
print "
";
@@ -444,13 +465,20 @@ if ($result)
if ($acct->rappro) // Si compte rapprochable
{
print "| ".$langs->trans("Conciliation")." | ";
- print "';
+ if ($user->rights->banque->consolidate)
+ {
+ print "';
+ }
+ else
+ {
+ print ''.$objp->num_releve.' | ';
+ }
print '
';
}