diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php
index eba39ad2379..b73eec10361 100644
--- a/htdocs/comm/propal/note.php
+++ b/htdocs/comm/propal/note.php
@@ -171,21 +171,25 @@ if ($_GET['propalid'])
print "";
// Note privée
- print '
'.$langs->trans("NotePrivate").' : ';
- print '';
- if ($_GET["action"] == 'edit')
- {
- print '';
- }
- else
+ if (! $user->societe_id)
{
- print ($propal->note?nl2br($propal->note):" ");
+ print ' '.$langs->trans("NotePrivate").' : ';
+ print '';
+ if ($_GET["action"] == 'edit')
+ {
+ print '';
+ print ' ';
+ print ''.$propal->note." ";
+ print ' ';
+ print ' ';
+ }
+ else
+ {
+ print ($propal->note?nl2br($propal->note):" ");
+ }
+ print " ";
}
- print "";
+
print "";
print '';
diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php
index 6dc0415c6d8..a05c198295d 100644
--- a/htdocs/commande/note.php
+++ b/htdocs/commande/note.php
@@ -148,21 +148,25 @@ if ($_GET["id"])
print "";
// Note privée
- print ''.$langs->trans("NotePrivate").' : ';
- print '';
- if ($_GET["action"] == 'edit')
- {
- print '';
- print ' ';
- print ''.$commande->note." ";
- print ' ';
- print ' ';
- }
- else
+ if (! $user->societe_id)
{
- print ($commande->note?nl2br($commande->note):" ");
+ print ' '.$langs->trans("NotePrivate").' : ';
+ print '';
+ if ($_GET["action"] == 'edit')
+ {
+ print '';
+ print ' ';
+ print ''.$commande->note." ";
+ print ' ';
+ print ' ';
+ }
+ else
+ {
+ print ($commande->note?nl2br($commande->note):" ");
+ }
+ print " ";
}
- print "";
+
print "";
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index f8f9b5e9e74..ce1fa1e4996 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1021,24 +1021,27 @@ if ($_GET['action'] == 'create')
print '';
// Note privée
- print '';
- print ''.$langs->trans('NotePrivate').' ';
- print '';
- print '';
- if (is_object($propal))
+ if (! $user->societe_id)
{
- print $propal->note;
+ print '';
+ print ''.$langs->trans('NotePrivate').' ';
+ print '';
+ print '';
+ if (is_object($propal))
+ {
+ print $propal->note;
+ }
+ if (is_object($commande))
+ {
+ print $commande->note;
+ }
+ if (is_object($contrat))
+ {
+ print $contrat->note;
+ }
+ print ' ';
}
- if (is_object($commande))
- {
- print $commande->note;
- }
- if (is_object($contrat))
- {
- print $contrat->note;
- }
- print ' ';
-
+
/*
\todo
L'info "Reference commande client" est une carac de la commande et non de la facture.
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index 265746e507b..29f5fc705c0 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -137,21 +137,25 @@ if ($_GET["facid"])
print "";
// Note privée
- print ''.$langs->trans("NotePrivate").' : ';
- print '';
- if ($_GET["action"] == 'edit')
- {
- print '';
- print ' ';
- print ''.$fac->note." ";
- print ' ';
- print ' ';
- }
- else
+ if (! $user->societe_id)
{
- print ($fac->note?nl2br($fac->note):" ");
+ print ' '.$langs->trans("NotePrivate").' : ';
+ print '';
+ if ($_GET["action"] == 'edit')
+ {
+ print '';
+ print ' ';
+ print ''.$fac->note." ";
+ print ' ';
+ print ' ';
+ }
+ else
+ {
+ print ($fac->note?nl2br($fac->note):" ");
+ }
+ print " ";
}
- print "";
+
print "";
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index 25f33580df1..42d7a31fb27 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -419,9 +419,12 @@ if ($_GET["action"] == 'create')
print ''.$langs->trans("NotePublic").' ';
print ' ';
- print ''.$langs->trans("NotePrivate").' ';
- print ' ';
-
+ if (! $user->societe_id)
+ {
+ print ''.$langs->trans("NotePrivate").' ';
+ print ' ';
+ }
+
print ' ';
print "\n";
diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php
index 563b698b289..1a8e1b88c46 100644
--- a/htdocs/contrat/note.php
+++ b/htdocs/contrat/note.php
@@ -169,21 +169,25 @@ if ($_GET["id"])
print "";
// Note privée
- print ''.$langs->trans("NotePrivate").' : ';
- print '';
- if ($_GET["action"] == 'edit')
- {
- print '';
- print ' ';
- print ''.$contrat->note." ";
- print ' ';
- print ' ';
- }
- else
+ if (! $user->societe_id)
{
- print ($contrat->note?nl2br($contrat->note):" ");
+ print ' '.$langs->trans("NotePrivate").' : ';
+ print '';
+ if ($_GET["action"] == 'edit')
+ {
+ print '';
+ print ' ';
+ print ''.$contrat->note." ";
+ print ' ';
+ print ' ';
+ }
+ else
+ {
+ print ($contrat->note?nl2br($contrat->note):" ");
+ }
+ print " ";
}
- print "";
+
print "";
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 7bfa7f9109f..82c54d4d001 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -256,7 +256,7 @@ if ($_GET["action"] == 'create')
print '';
}
- if ($commande->note)
+ if ($commande->note && ! $user->societe_id)
{
print ''.$langs->trans("NotePrivate").': '.nl2br($commande->note)." ";
}
diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php
index 357b9d00ff9..117901ad348 100644
--- a/htdocs/fourn/commande/note.php
+++ b/htdocs/fourn/commande/note.php
@@ -156,14 +156,16 @@ if ($_GET["id"] > 0)
print ''.$langs->trans("AmountTTC").' '.price($commande->total_ttc).' ';
print ''.$langs->trans("Currency".$conf->monnaie).' ';
-
- print ''.$langs->trans("NotePrivate").' ';
- print '';
- if ($user->rights->fournisseur->commande->creer) print '';
- print nl2br($commande->note);
- if ($user->rights->fournisseur->commande->creer) print ' ';
- print ' ';
-
+ if (! $user->societe_id)
+ {
+ print ''.$langs->trans("NotePrivate").' ';
+ print '';
+ if ($user->rights->fournisseur->commande->creer) print '';
+ print nl2br($commande->note);
+ if ($user->rights->fournisseur->commande->creer) print ' ';
+ print ' ';
+ }
+
print ''.$langs->trans("NotePublic").' ';
print '';
if ($user->rights->fournisseur->commande->creer) print '';