dolibarr  16.0.5
agenda_other.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
4  * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
5  * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
6  * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
7  * Copyright (C) 2017 Open-DSI <support@open-dsi.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  */
22 
29 require '../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php';
34 
35 if (!$user->admin) {
37 }
38 
39 // Load translation files required by the page
40 $langs->loadLangs(array('admin', 'other', 'agenda', 'users'));
41 
42 $action = GETPOST('action', 'aZ09');
43 $value = GETPOST('value', 'alpha');
44 $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
45 
46 $param = GETPOST('param', 'alpha');
47 $cancel = GETPOST('cancel', 'alpha');
48 $scandir = GETPOST('scan_dir', 'alpha');
49 $type = 'action';
50 
51 
52 /*
53  * Actions
54  */
55 
56 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
57 
58 $reg = array();
59 if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
60  $code = $reg[1];
61  $value = (GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1);
62  if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) {
63  Header("Location: ".$_SERVER["PHP_SELF"]);
64  exit;
65  } else {
66  dol_print_error($db);
67  }
68 }
69 
70 if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
71  $code = $reg[1];
72  if (dolibarr_del_const($db, $code, $conf->entity) > 0) {
73  Header("Location: ".$_SERVER["PHP_SELF"]);
74  exit;
75  } else {
76  dol_print_error($db);
77  }
78 }
79 if ($action == 'set') {
80  $getDefaultFilter = GETPOST('AGENDA_DEFAULT_FILTER_TYPE');
81  $defaultfilter = (is_array($getDefaultFilter)) ? implode(',', $getDefaultFilter) : $getDefaultFilter;
82  dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity);
83  dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', $defaultfilter, 'chaine', 0, '', $conf->entity);
84  dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
85  dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
86 
87  $defaultValues = new DefaultValues($db);
88  $result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
89  if (!is_array($result) && $result < 0) {
90  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
91  } elseif (count($result) > 0) {
92  foreach ($result as $defval) {
93  $defaultValues->id = $defval->id;
94  $resultDel = $defaultValues->delete($user);
95  if ($resultDel < 0) {
96  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
97  }
98  }
99  }
100  $defaultValues->type = 'createform';
101  $defaultValues->entity = $conf->entity;
102  $defaultValues->user_id = 0;
103  $defaultValues->page = 'comm/action/card.php';
104  $defaultValues->param = 'complete';
105  $defaultValues->value = GETPOST('AGENDA_EVENT_DEFAULT_STATUS');
106  $resultCreat = $defaultValues->create($user);
107  if ($resultCreat < 0) {
108  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
109  } else {
110  setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
111  }
112 } elseif ($action == 'specimen') { // For orders
113  $modele = GETPOST('module', 'alpha');
114 
115  $commande = new CommandeFournisseur($db);
116  $commande->initAsSpecimen();
117  $commande->thirdparty = $specimenthirdparty;
118 
119  // Search template files
120  $file = ''; $classname = ''; $filefound = 0;
121  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
122  foreach ($dirmodels as $reldir) {
123  $file = dol_buildpath($reldir."core/modules/action/doc/pdf_".$modele.".modules.php", 0);
124  if (file_exists($file)) {
125  $filefound = 1;
126  $classname = "pdf_".$modele;
127  break;
128  }
129  }
130 
131  if ($filefound) {
132  require_once $file;
133 
134  $module = new $classname($db, $commande);
135 
136  if ($module->write_file($commande, $langs) > 0) {
137  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf");
138  return;
139  } else {
140  setEventMessages($module->error, $module->errors, 'errors');
141  dol_syslog($module->error, LOG_ERR);
142  }
143  } else {
144  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
145  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
146  }
147 } elseif ($action == 'setmodel') {
148  // Activate a model
149  //print "sssd".$value;
150  $ret = addDocumentModel($value, $type, $label, $scandir);
151 } elseif ($action == 'del') {
152  $ret = delDocumentModel($value, $type);
153  if ($ret > 0) {
154  if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") {
155  dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity);
156  }
157  }
158 } elseif ($action == 'setdoc') {
159  // Set default model
160  if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
161  // La constante qui a ete lue en avant du nouveau set
162  // on passe donc par une variable pour avoir un affichage coherent
163  $conf->global->ACTION_EVENT_ADDON_PDF = $value;
164  }
165 
166  // On active le modele
167  $ret = delDocumentModel($value, $type);
168  if ($ret > 0) {
169  $ret = addDocumentModel($value, $type, $label, $scandir);
170  }
171 }
172 
173 
179 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
180 
181 $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
182 llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
183 
184 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
185 print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');
186 
187 
188 
189 $head = agenda_prepare_head();
190 
191 print dol_get_fiche_head($head, 'other', $langs->trans("Agenda"), -1, 'action');
192 
193 
194 /*
195  * Documents models for supplier orders
196  */
197 
198 
199 // Define array def of models
200 $def = array();
201 
202 $sql = "SELECT nom";
203 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
204 $sql .= " WHERE type = 'action'";
205 $sql .= " AND entity = ".$conf->entity;
206 
207 $resql = $db->query($sql);
208 if ($resql) {
209  $i = 0;
210  $num_rows = $db->num_rows($resql);
211  while ($i < $num_rows) {
212  $array = $db->fetch_array($resql);
213  array_push($def, $array[0]);
214  $i++;
215  }
216 } else {
217  dol_print_error($db);
218 }
219 
220 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
221  print load_fiche_titre($langs->trans("AgendaModelModule"), '', '');
222 
223  print '<table class="noborder centpercent">'."\n";
224  print '<tr class="liste_titre">'."\n";
225  print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
226  print '<td>'.$langs->trans("Description").'</td>'."\n";
227  print '<td class="center" width="60">'.$langs->trans("Status").'</td>'."\n";
228  print '<td class="center" width="60">'.$langs->trans("Default").'</td>'."\n";
229  print '<td class="center" width="40">'.$langs->trans("ShortInfo").'</td>';
230  print '<td class="center" width="40">'.$langs->trans("Preview").'</td>';
231  print '</tr>'."\n";
232 
233  clearstatcache();
234 
235  foreach ($dirmodels as $reldir) {
236  $dir = dol_buildpath($reldir."core/modules/action/doc");
237 
238  if (is_dir($dir)) {
239  $handle = opendir($dir);
240  if (is_resource($handle)) {
241  while (($file = readdir($handle)) !== false) {
242  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
243  $name = substr($file, 4, dol_strlen($file) - 16);
244  $classname = substr($file, 0, dol_strlen($file) - 12);
245 
246  require_once $dir.'/'.$file;
247  $module = new $classname($db, new ActionComm($db));
248 
249  print '<tr class="oddeven">'."\n";
250  print "<td>";
251  print (empty($module->name) ? $name : $module->name);
252  print "</td>\n";
253  print "<td>\n";
254  require_once $dir.'/'.$file;
255  $module = new $classname($db, $specimenthirdparty);
256  if (method_exists($module, 'info')) {
257  print $module->info($langs);
258  } else {
259  print $module->description;
260  }
261  print "</td>\n";
262 
263  // Active
264  if (in_array($name, $def)) {
265  print '<td class="center">'."\n";
266  if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") {
267  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
268  print img_picto($langs->trans("Enabled"), 'switch_on');
269  print '</a>';
270  } else {
271  print img_picto($langs->trans("Enabled"), 'switch_on');
272  }
273  print "</td>";
274  } else {
275  print '<td class="center">'."\n";
276  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
277  print "</td>";
278  }
279 
280  // Default
281  print '<td class="center">';
282  if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") {
283  print img_picto($langs->trans("Default"), 'on');
284  } else {
285  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&amp;scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&amp;type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
286  }
287  print '</td>';
288 
289  // Info
290  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
291  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
292  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
293  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
294  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
295  print '<td class="center">';
296  print $form->textwithpicto('', $htmltooltip, 1, 0);
297  print '</td>';
298  print '<td class="center">';
299  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
300  print '</td>';
301 
302  print "</tr>\n";
303  }
304  }
305  closedir($handle);
306  }
307  }
308  }
309  print '</table><br>';
310 }
311 
312 print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
313 print '<input type="hidden" name="token" value="'.newToken().'">';
314 print '<input type="hidden" name="action" value="set">';
315 
316 print '<table class="noborder allwidth">'."\n";
317 print '<tr class="liste_titre">'."\n";
318 print '<td>'.$langs->trans("Parameters").'</td>'."\n";
319 print '<td class="center">&nbsp;</td>'."\n";
320 print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
321 print '</tr>'."\n";
322 
323 // AGENDA_DEFAULT_VIEW
324 print '<tr class="oddeven">'."\n";
325 $htmltext = $langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup"));
326 print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n";
327 print '<td class="center">&nbsp;</td>'."\n";
328 print '<td class="right">'."\n";
329 $tmplist = array(''=>'&nbsp;', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
330 print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
331 print '</td></tr>'."\n";
332 
333 // Manual or automatic
334 
335 print '<tr class="oddeven">'."\n";
336 print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
337 print '<td class="center">&nbsp;</td>'."\n";
338 print '<td class="right">'."\n";
339 //print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
340 if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
341  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
342 } else {
343  print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
344 }
345 print '</td></tr>'."\n";
346 
347 if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
348  print '<!-- AGENDA_USE_EVENT_TYPE_DEFAULT -->';
349  print '<tr class="oddeven">'."\n";
350  print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
351  print '<td class="center">&nbsp;</td>'."\n";
352  print '<td class="right nowrap">'."\n";
353  $formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1);
354  print '</td></tr>'."\n";
355 }
356 
357 // AGENDA_EVENT_DEFAULT_STATUS
358 print '<tr class="oddeven">'."\n";
359 print '<td>'.$langs->trans("AGENDA_EVENT_DEFAULT_STATUS").'</td>'."\n";
360 print '<td class="center">&nbsp;</td>'."\n";
361 print '<td class="right nowrap">'."\n";
362 $defval = 'na';
363 $defaultValues = new DefaultValues($db);
364 $result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
365 if (!is_array($result) && $result < 0) {
366  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
367 } elseif (count($result) > 0) {
368  $defval = reset($result)->value;
369 }
370 $formactions->form_select_status_action('agenda', $defval, 1, "AGENDA_EVENT_DEFAULT_STATUS", 0, 1, 'maxwidth200');
371 print '</td></tr>'."\n";
372 
373 // AGENDA_DEFAULT_FILTER_TYPE
374 print '<tr class="oddeven">'."\n";
375 print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
376 print '<td class="center">&nbsp;</td>'."\n";
377 print '<td class="right nowrap">'."\n";
378 $multiselect = 0;
379 if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) {
380  // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
381  $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
382 }
383 $formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1, $multiselect);
384 print '</td></tr>'."\n";
385 
386 // AGENDA_DEFAULT_FILTER_STATUS
387 // TODO Remove to use the default generic feature
388 print '<tr class="oddeven">'."\n";
389 print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
390 print '<td class="center">&nbsp;</td>'."\n";
391 print '<td class="right">'."\n";
392 $formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
393 print '</td></tr>'."\n";
394 
395 print '</table>';
396 
397 print dol_get_fiche_end();
398 
399 print $form->buttonsSaveCancel("Save", '');
400 
401 print '</form>';
402 
403 print "<br>";
404 
405 // End of page
406 llxFooter();
407 $db->close();
yn
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
Definition: functions.lib.php:6491
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
ActionComm
Class to manage agenda events (actions)
Definition: actioncomm.class.php:38
dolibarr_del_const
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Definition: admin.lib.php:552
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
agenda_prepare_head
agenda_prepare_head()
Prepare array with list of tabs.
Definition: agenda.lib.php:363
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
FormActions
Class to manage building of HTML components.
Definition: html.formactions.class.php:30
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
$formactions
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif($action=='specimen') elseif($action=='setmodel') elseif($action=='del') elseif($action=='setdoc') $formactions
View.
Definition: agenda_other.php:178
delDocumentModel
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1894
$wikihelp
if($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
Definition: agenda_xcal.php:72
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1603
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
dol_strlen
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
Definition: functions.lib.php:3747
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
DefaultValues
Class for MyObject.
Definition: defaultvalues.class.php:33
CommandeFournisseur
Class to manage predefined suppliers products.
Definition: fournisseur.commande.class.php:47
dolibarr_set_const
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
Definition: admin.lib.php:627
addDocumentModel
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1863
img_object
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
Definition: functions.lib.php:4211
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59