diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 2e6dc6538e3..046a1cb9b27 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -937,7 +937,7 @@ print "
\n";
// Confirmation de la suppression de la ligne
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index db509e52040..7217e1eedf7 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -994,7 +994,7 @@ if ($action == 'create')
// Bank account
if ($object->fk_account > 0)
{
- 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).' | ';
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 3fbd4fa462d..ae0f8f9398a 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -787,7 +787,7 @@ while ($i < min($num,$limit))
print '';
print ''.img_object($langs->trans("AddAction"),"action").'';
print ' ';
- print '';
+ print '';
print img_picto($langs->trans("VCard"),'vcard.png').' ';
print ' | ';
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 7b812e7ee36..c9acc1f310e 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3141,8 +3141,16 @@ abstract class CommonObject
$resql = $this->db->query($sql);
if ($resql)
{
- $res = $this->db->fetch_object($resql);
- return 'Incoterm : '.$res->code.' - '.$this->location_incoterms;
+ $num = $this->db->num_rows($resql);
+ if ($num > 0)
+ {
+ $res = $this->db->fetch_object($resql);
+ return 'Incoterm : '.$res->code.' - '.$this->location_incoterms;
+ }
+ else
+ {
+ return '';
+ }
}
else
{
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index d432bf61d8a..d8ac0a33cb2 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3269,11 +3269,14 @@ class Form
print '';
print '';
} 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 " ";
}
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index b0cdd488adf..9327c0d2a95 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1087,7 +1087,7 @@ if (empty($reshook))
$action = '';
}
- elseif ($action == 'classin')
+ elseif ($action == 'classin' && $user->rights->fournisseur->facture->creer)
{
$object->fetch($id);
$result=$object->setProject($projectid);
@@ -2103,7 +2103,9 @@ else
print '';
print '';
if ($action == 'editconditions')
@@ -2123,7 +2125,9 @@ else
print '';
print ' | ';
if ($action == 'editmode')
@@ -2198,7 +2202,7 @@ else
}
print " | ";
print ' ';
-
+
// Incoterms
if (!empty($conf->incoterm->enabled))
{
@@ -2620,13 +2624,17 @@ else
// Reopen a standard paid invoice
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
{
- if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice
+ if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice
{
print '';
}
else
{
- print ''.$langs->trans('ReOpen').' ';
+ if ($user->rights->fournisseur->facture->creer) {
+ print ''.$langs->trans('ReOpen').' ';
+ } elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
+ print ''.$langs->trans('ReOpen').' ';
+ }
}
}
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 82b29865233..393d3a1fad4 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -41,6 +41,7 @@ $langs->load("customers");
$langs->load("suppliers");
$langs->load("bills");
$langs->load("compta");
+$langs->load('commercial');
// Security check
$socid = GETPOST('socid','int');
@@ -167,7 +168,7 @@ $arrayfields=array(
's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>$checkedprofid4),
's.idprof5'=>array('label'=>$langs->trans("ProfId5Short"), 'checked'=>$checkedprofid5),
's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6),
- 'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1),
+ 'customerorsupplier'=>array('label'=>$langs->trans('Nature'), 'checked'=>1),
's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel),
's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm),
's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
@@ -613,7 +614,7 @@ if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titr
if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder);
-if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre(''); // type of customer
+if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre($arrayfields['customerorsupplier']['label']); // type of customer
if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder);
// Extra fields
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index 050e0186444..d63e697c67f 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1906,7 +1906,7 @@ if ($action == 'create')
$formmail->withtocc = $liste;
$formmail->withtoccc = (! empty($conf->global->MAIN_EMAIL_USECCC) ? $conf->global->MAIN_EMAIL_USECCC : false);
- $formmail->withtopic = $outputlangs->trans('SendAskRef', '__ASKREF__');
+ $formmail->withtopic = $outputlangs->trans('SendAskRef', '__SUPPLIERPROPREF__');
$formmail->withfile = 2;
$formmail->withbody = 1;
diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php
index 62efff2f88f..b0ed84801a6 100644
--- a/htdocs/user/agenda_extsites.php
+++ b/htdocs/user/agenda_extsites.php
@@ -153,7 +153,11 @@ $head=user_prepare_head($object);
dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user');
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = '';
+
+if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+}
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 63cdacf958d..8d5e95a7f77 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -133,7 +133,11 @@ if ($id && $action != 'edit')
$title = $langs->trans("User");
dol_fiche_head($head, 'bank', $title, 0, 'user');
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = '';
+
+ if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+ }
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index 10c3d433c2c..2d5ace33809 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1196,7 +1196,11 @@ else
else
{
$title = $langs->trans("User");
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = '';
+
+ if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+ }
}
$head = user_prepare_head($object);
diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php
index cb1e9f875aa..159cf038a01 100644
--- a/htdocs/user/clicktodial.php
+++ b/htdocs/user/clicktodial.php
@@ -98,7 +98,11 @@ if ($id > 0)
dol_fiche_head($head, 'clicktodial', $title, 0, 'user');
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = '';
+
+ if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+ }
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
diff --git a/htdocs/user/document.php b/htdocs/user/document.php
index 081bf2bc408..7a60209f0d4 100644
--- a/htdocs/user/document.php
+++ b/htdocs/user/document.php
@@ -131,8 +131,11 @@ if ($object->id)
dol_fiche_head($head, 'document', $langs->trans("User"),0,'user');
- $linkback = ''.$langs->trans("BackToList").'';
-
+ $linkback = '';
+ if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+ }
+
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
print '';
diff --git a/htdocs/user/info.php b/htdocs/user/info.php
index 5ea7200a0f7..55450590013 100644
--- a/htdocs/user/info.php
+++ b/htdocs/user/info.php
@@ -68,7 +68,11 @@ $title = $langs->trans("User");
dol_fiche_head($head, 'info', $title, 0, 'user');
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = '';
+
+if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+}
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php
index 1da5911861c..0f0cc6b4ed7 100644
--- a/htdocs/user/ldap.php
+++ b/htdocs/user/ldap.php
@@ -96,7 +96,11 @@ $head = user_prepare_head($object);
$title = $langs->trans("User");
dol_fiche_head($head, 'ldap', $title, 0, 'user');
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = '';
+
+if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+}
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
diff --git a/htdocs/user/note.php b/htdocs/user/note.php
index 38aef489b87..1858b100ddf 100644
--- a/htdocs/user/note.php
+++ b/htdocs/user/note.php
@@ -90,7 +90,11 @@ if ($id)
$title = $langs->trans("User");
dol_fiche_head($head, 'note', $title, 0, 'user');
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = '';
+
+ if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+ }
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php
index f0ca0f17c31..ef513175dcc 100644
--- a/htdocs/user/param_ihm.php
+++ b/htdocs/user/param_ihm.php
@@ -180,8 +180,12 @@ if ($action == 'edit')
if ($action == 'edit')
{
dol_fiche_head($head, 'guisetup', $title, 0, 'user');
-
- $linkback = ''.$langs->trans("BackToList").'';
+
+ $linkback = '';
+
+ if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+ }
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php
index 95c3eb6c87f..082d6286b8a 100644
--- a/htdocs/user/perms.php
+++ b/htdocs/user/perms.php
@@ -257,7 +257,11 @@ else
* Ecran ajout/suppression permission
*/
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = '';
+
+if ($user->rights->user->user->lire || $user->admin) {
+ $linkback = ''.$langs->trans("BackToList").'';
+}
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|