Sec: Les notes prives sont invisibles aux utilisateurs externes
This commit is contained in:
parent
cfb72166c6
commit
870cc75f6e
@ -171,21 +171,25 @@ if ($_GET['propalid'])
|
||||
print "</td></tr>";
|
||||
|
||||
// Note privée
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?propalid='.$propal->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="8">'.$propal->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print ($propal->note?nl2br($propal->note):" ");
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?propalid='.$propal->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="8">'.$propal->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ($propal->note?nl2br($propal->note):" ");
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -148,21 +148,25 @@ if ($_GET["id"])
|
||||
print "</td></tr>";
|
||||
|
||||
// Note privée
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?id='.$commande->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="8">'.$commande->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print ($commande->note?nl2br($commande->note):" ");
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?id='.$commande->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="8">'.$commande->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ($commande->note?nl2br($commande->note):" ");
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
@ -1021,24 +1021,27 @@ if ($_GET['action'] == 'create')
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
// Note privée
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
||||
print '<td valign="top" colspan="2">';
|
||||
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">';
|
||||
if (is_object($propal))
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print $propal->note;
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
||||
print '<td valign="top" colspan="2">';
|
||||
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">';
|
||||
if (is_object($propal))
|
||||
{
|
||||
print $propal->note;
|
||||
}
|
||||
if (is_object($commande))
|
||||
{
|
||||
print $commande->note;
|
||||
}
|
||||
if (is_object($contrat))
|
||||
{
|
||||
print $contrat->note;
|
||||
}
|
||||
print '</textarea></td></tr>';
|
||||
}
|
||||
if (is_object($commande))
|
||||
{
|
||||
print $commande->note;
|
||||
}
|
||||
if (is_object($contrat))
|
||||
{
|
||||
print $contrat->note;
|
||||
}
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
|
||||
/*
|
||||
\todo
|
||||
L'info "Reference commande client" est une carac de la commande et non de la facture.
|
||||
|
||||
@ -137,21 +137,25 @@ if ($_GET["facid"])
|
||||
print "</td></tr>";
|
||||
|
||||
// Note privée
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?facid='.$fac->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="8">'.$fac->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print ($fac->note?nl2br($fac->note):" ");
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?facid='.$fac->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="8">'.$fac->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ($fac->note?nl2br($fac->note):" ");
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
@ -419,9 +419,12 @@ if ($_GET["action"] == 'create')
|
||||
print '<tr><td>'.$langs->trans("NotePublic").'</td><td valign="top">';
|
||||
print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'"></textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("NotePrivate").'</td><td valign="top">';
|
||||
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'"></textarea></td></tr>';
|
||||
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("NotePrivate").'</td><td valign="top">';
|
||||
print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'"></textarea></td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Create").'"></td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -169,21 +169,25 @@ if ($_GET["id"])
|
||||
print "</td></tr>";
|
||||
|
||||
// Note privée
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?id='.$contrat->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="'.ROWS_8.'">'.$contrat->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print ($contrat->note?nl2br($contrat->note):" ");
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form method="post" action="note.php?id='.$contrat->id.'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<textarea name="note" cols="80" rows="'.ROWS_8.'">'.$contrat->note."</textarea><br>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ($contrat->note?nl2br($contrat->note):" ");
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@ if ($_GET["action"] == 'create')
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($commande->note)
|
||||
if ($commande->note && ! $user->societe_id)
|
||||
{
|
||||
print '<tr><td colspan="3">'.$langs->trans("NotePrivate").': '.nl2br($commande->note)."</td></tr>";
|
||||
}
|
||||
|
||||
@ -156,14 +156,16 @@ if ($_GET["id"] > 0)
|
||||
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td align="right">'.price($commande->total_ttc).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td><td> </td></tr>';
|
||||
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="60" rows="'.ROWS_4.'" name="note">';
|
||||
print nl2br($commande->note);
|
||||
if ($user->rights->fournisseur->commande->creer) print '</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="60" rows="'.ROWS_4.'" name="note">';
|
||||
print nl2br($commande->note);
|
||||
if ($user->rights->fournisseur->commande->creer) print '</textarea>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="60" rows="'.ROWS_4.'" name="note_public">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user