From 996b5e9f874e47f68a46e34886df06c6eefb01ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 18:17:46 +0200 Subject: [PATCH] Corrected translation errors and little bug showing a non-available button to a restricted user --- htdocs/compta/facture/fiche-rec.php | 8 +++++--- htdocs/core/class/html.form.class.php | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 3a55c8b57c2ad..289ac8d704aee 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -899,7 +899,7 @@ // Bank account if ($object->fk_account > 0) { - print "".$langs->trans('BankAccount').""; + print "".$langs->trans('RIB').""; $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); print ""; } @@ -1111,7 +1111,7 @@ print ''; - if ($action != 'classify') { + if ($action != 'classify' && $user->rights->facture->creer) { print ''; @@ -1129,9 +1129,11 @@ } // Bank Account + $langs->load('banks'); + print '
'; print $langs->trans('Project'); print 'id . '">'; print img_edit($langs->trans('SetProject'), 1); print '
'; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3f8ed836f4444..e787b3a65cc84 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3150,11 +3150,14 @@ function formSelectAccount($page, $selected='', $htmlname='fk_account', $addempt print ''; print '
'; - print $langs->trans('BankAccount'); + print $langs->trans('RIB'); print ''; if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; } 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").' '.$bankstatic->currency_code); + print $this->textwithpicto($bankstatic->getNomUrl(1),$langs->trans("AccountCurrency").' '.$bankstatic->currency_code); } else { print " "; }