Skip to content

Commit

Permalink
Corrected translation errors and little bug showing a non-available b…
Browse files Browse the repository at this point in the history
…utton to a restricted user
  • Loading branch information
marcosgdf committed Apr 9, 2017
1 parent fe4f712 commit 996b5e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions htdocs/compta/facture/fiche-rec.php
Expand Up @@ -899,7 +899,7 @@
// Bank account
if ($object->fk_account > 0)
{
print "<tr><td>".$langs->trans('BankAccount')."</td><td>";
print "<tr><td>".$langs->trans('RIB')."</td><td>";
$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
print "</td></tr>";
}
Expand Down Expand Up @@ -1111,7 +1111,7 @@
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project');
print '</td>';
if ($action != 'classify') {
if ($action != 'classify' && $user->rights->facture->creer) {
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&amp;facid=' . $object->id . '">';
print img_edit($langs->trans('SetProject'), 1);
print '</a></td>';
Expand All @@ -1129,9 +1129,11 @@
}

// Bank Account
$langs->load('banks');

print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('BankAccount');
print $langs->trans('RIB');
print '<td>';
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
Expand Down
5 changes: 4 additions & 1 deletion htdocs/core/class/html.form.class.php
Expand Up @@ -3150,11 +3150,14 @@ function formSelectAccount($page, $selected='', $htmlname='fk_account', $addempt
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr></table></form>';
} else {

$langs->load('banks');

if ($selected) {
require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php';
$bankstatic=new Account($this->db);
$bankstatic->fetch($selected);
print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").'&nbsp;'.$bankstatic->currency_code);
print $this->textwithpicto($bankstatic->getNomUrl(1),$langs->trans("AccountCurrency").'&nbsp;'.$bankstatic->currency_code);
} else {
print "&nbsp;";
}
Expand Down

0 comments on commit 996b5e9

Please sign in to comment.