';
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 af9be04a207..78664a795c7 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -129,7 +129,7 @@ $fieldstosearchall = array(
$arrayfields=array(
'p.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
'p.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
- 'p.poste'=>array('label'=>$langs->trans("Post"), 'checked'=>1),
+ 'p.poste'=>array('label'=>$langs->trans("PostOrFunction"), 'checked'=>1),
'p.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0),
'p.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0),
'p.phone'=>array('label'=>$langs->trans("PhonePro"), 'checked'=>1),
@@ -761,8 +761,10 @@ if ($result)
}
// Action column - Links Add action and Export vcard
print '';
- print ''.img_object($langs->trans("AddAction"),"action").'';
- print ' ';
+ if ($user->rights->agenda->myactions->create) {
+ print ''.img_object($langs->trans("AddAction"),"action").'';
+ 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 018aef19519..60247186734 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3073,8 +3073,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 3f8ed836f44..e787b3a65cc 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3150,11 +3150,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/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 93a3deff2f7..8a788c2723e 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -1373,7 +1373,7 @@ class CommandeFournisseur extends CommonOrder
if ($result > 0)
{
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
- $ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice
+ $fourn_ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice
}
if ($result == 0) // If result == 0, we failed to found the supplier reference price
{
@@ -1457,7 +1457,7 @@ class CommandeFournisseur extends CommonOrder
$sql.= ", '".$localtax1_type."',";
$sql.= " '".$localtax2_type."'";
- $sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$this->db->escape($ref)."',";
+ $sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$this->db->escape($fourn_ref)."',";
$sql.= "'".price2num($total_ht)."',";
$sql.= "'".price2num($total_tva)."',";
$sql.= "'".price2num($total_localtax1)."',";
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 2a1f1dab8bc..ac94d1b0e62 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -870,7 +870,7 @@ if (empty($reshook))
$action = '';
}
- elseif ($action == 'classin')
+ elseif ($action == 'classin' && $user->rights->fournisseur->facture->creer)
{
$object->fetch($id);
$result=$object->setProject($projectid);
@@ -1844,7 +1844,9 @@ else
print '';
print ' | ';
if ($action == 'editconditions')
@@ -1864,7 +1866,9 @@ else
print '';
print ' | ';
if ($action == 'editmode')
@@ -1994,7 +1998,7 @@ else
print '| ';
print $langs->trans('Project');
print ' | ';
- if ($action != 'classify')
+ if ($action != 'classify' && $user->rights->fournisseur->facture->creer)
{
print 'id.'">';
print img_edit($langs->trans('SetProject'),1);
@@ -2135,13 +2139,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 ''.$langs->trans('ReOpen').'';
}
else
{
- print ''.$langs->trans('ReOpen').'';
+ if ($user->rights->fournisseur->facture->creer) {
+ print ''.$langs->trans('ReOpen').'';
+ } elseif (!$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) {
+ print ''.$langs->trans('ReOpen').'';
+ }
}
}
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index b7125da21e2..f3ef24d12d2 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -40,6 +40,7 @@ $langs->load("customers");
$langs->load("suppliers");
$langs->load("bills");
$langs->load("compta");
+$langs->load('commercial');
// Security check
$socid = GETPOST('socid','int');
@@ -160,7 +161,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),
@@ -592,7 +593,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 b0792defc8f..9ed38461180 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1907,7 +1907,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 823f5ad307e..52f67aaac0c 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 951c3a6ef7e..f8ff1aab18b 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 1728b0b170b..a225edc1873 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1183,7 +1183,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 36338f03e10..b77cc400e56 100644
--- a/htdocs/user/document.php
+++ b/htdocs/user/document.php
@@ -129,7 +129,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);
diff --git a/htdocs/user/info.php b/htdocs/user/info.php
index 1d10875b3eb..4b5ea6506c3 100644
--- a/htdocs/user/info.php
+++ b/htdocs/user/info.php
@@ -67,7 +67,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 ccd7eb153a4..4fc274208d7 100644
--- a/htdocs/user/note.php
+++ b/htdocs/user/note.php
@@ -89,7 +89,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 4d254349a7d..f71934be80f 100644
--- a/htdocs/user/param_ihm.php
+++ b/htdocs/user/param_ihm.php
@@ -161,8 +161,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 3240ae2d5ec..3dd6e329380 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);
|
|