32if ($action ==
'setnote_public' && !empty($permissionnote) && !
GETPOST(
'cancel',
'alpha')) {
33 if (empty($action) || !is_object(
$object) || empty(
$id)) {
34 dol_print_error(
null,
'Include of actions_setnotes.inc.php was done but required variable was not set before');
42 if ($result_update < 0) {
44 } elseif (in_array(
$object->table_element, array(
'supplier_proposal',
'propal',
'commande_fournisseur',
'commande',
'facture_fourn',
'facture'))) {
47 $outputlangs = $langs;
50 $newlang =
GETPOST(
'lang_id',
'aZ09');
53 if (!is_object(
$object->thirdparty)) {
56 $newlang =
$object->thirdparty->default_lang;
58 if (!empty($newlang)) {
60 $outputlangs->setDefaultLang($newlang);
69 $resultGenDoc =
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
70 if ($resultGenDoc < 0) {
79} elseif ($action ==
'setnote_private' && !empty($permissionnote) && !
GETPOST(
'cancel',
'alpha')) {
80 if (empty($user->socid)) {
82 if (empty($action) || !is_object(
$object) || empty(
$id)) {
83 dol_print_error(
null,
'Include of actions_setnotes.inc.php was done but required variable was not set before');
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage translations.
dol_html_entity_decode($a, $b, $c='UTF-8', $keepsomeentities=0)
Replace html_entity_decode functions to manage errors.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.