Corrected comparison of Account::canBeConciliated output
This commit is contained in:
parent
66313f584b
commit
6184c71181
@ -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 not cash account and can be reconciliate
|
||||||
if ($user->rights->banque->consolidate)
|
if ($user->rights->banque->consolidate) {
|
||||||
{
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/bank/rappro.php?account='.$object->id.($vline ? '&vline='.$vline : '').'">'.$langs->trans("Conciliate").'</a>';
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/bank/rappro.php?account='.$object->id.($vline?'&vline='.$vline:'').'">'.$langs->trans("Conciliate").'</a>';
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
|
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -529,8 +525,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="right">'.$langs->trans("Credit").'</td>';
|
print '<td align="right">'.$langs->trans("Credit").'</td>';
|
||||||
print '<td align="right" width="80">'.$langs->trans("BankBalance").'</td>';
|
print '<td align="right" width="80">'.$langs->trans("BankBalance").'</td>';
|
||||||
print '<td align="center" width="60">';
|
print '<td align="center" width="60">';
|
||||||
if ($object->canBeConciliated()) print $langs->trans("AccountStatementShort");
|
if ($object->canBeConciliated() > 0) {
|
||||||
else print ' ';
|
print $langs->trans("AccountStatementShort");
|
||||||
|
} else {
|
||||||
|
print ' ';
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
|
||||||
|
|||||||
@ -144,14 +144,11 @@ if (empty($num))
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($object->canBeConciliated()) {
|
if ($object->canBeConciliated() > 0) {
|
||||||
// If not cash account and can be reconciliate
|
// If not cash account and can be reconciliate
|
||||||
if ($user->rights->banque->consolidate)
|
if ($user->rights->banque->consolidate) {
|
||||||
{
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/bank/rappro.php?account='.$object->id.($vline ? '&vline='.$vline : '').'">'.$langs->trans("Conciliate").'</a>';
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/bank/rappro.php?account='.$object->id.($vline?'&vline='.$vline:'').'">'.$langs->trans("Conciliate").'</a>';
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
|
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user