dolibarr  17.0.4
modAgenda.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
4  * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
5  * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
6  * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
7  * Copyright (C) 2009-2011 Regis Houssin <regis.houssin@inodbox.com>
8  * Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
9  * Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
10  * Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program. If not, see <https://www.gnu.org/licenses/>.
24  */
25 
33 include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
34 
39 {
40 
46  public function __construct($db)
47  {
48  global $conf, $user;
49 
50  $this->db = $db;
51  $this->numero = 2400;
52 
53  $this->family = "projects";
54  $this->module_position = '16';
55  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
56  $this->name = preg_replace('/^mod/i', '', get_class($this));
57  $this->description = "Follow events or rendez-vous. Record manual events into Agendas or let application record automatic events for log tracking.";
58  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
59  $this->version = 'dolibarr';
60  // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
61  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
62  $this->picto = 'action';
63 
64  // Data directories to create when module is enabled
65  $this->dirs = array("/agenda/temp");
66 
67  // Config pages
68  $this->config_page_url = array("agenda_other.php");
69 
70  // Dependencies
71  $this->hidden = false; // A condition to hide module
72  $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
73  $this->requiredby = array(); // List of module ids to disable if this one is disabled
74  $this->conflictwith = array(); // List of module class names as string this module is in conflict with
75  $this->langfiles = array("companies");
76  $this->phpmin = array(7, 0); // Minimum version of PHP required by module
77 
78  // Module parts
79  $this->module_parts = array();
80 
81  // Constants
82  //-----------
83  // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
84  // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
85  // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
86  // );
87  $this->const = array();
88  //$this->const[] = array('AGENDA_DEFAULT_FILTER_TYPE', 'chaine', 'AC_NON_AUTO', 'Default filter for type of event on agenda', 0, 'current');
89  $sqlreadactions = "SELECT code, label, description FROM ".MAIN_DB_PREFIX."c_action_trigger ORDER by rang";
90  $resql = $this->db->query($sqlreadactions);
91  if ($resql) {
92  while ($obj = $this->db->fetch_object($resql)) {
93  //if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation).
94  if (preg_match('/^TASK_/', $obj->code)) {
95  continue; // We don't track such events by default.
96  }
97  //if (preg_match('/^_MODIFY/',$obj->code)) continue; // We don't track such events by default.
98  $this->const[] = array('MAIN_AGENDA_ACTIONAUTO_'.$obj->code, "chaine", "1", '', 0, 'current');
99  }
100  } else {
101  dol_print_error($this->db->lasterror());
102  }
103 
104  // New pages on tabs
105  // -----------------
106  $this->tabs = array();
107 
108  // Boxes
109  //------
110  $this->boxes = array(0=>array('file'=>'box_actions.php', 'enabledbydefaulton'=>'Home'));
111 
112  // Cronjobs
113  //------------
114  $datestart = dol_now();
115  $this->cronjobs = array(
116  0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>5, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart),
117  );
118 
119  // Permissions
120  //------------
121  $this->rights = array();
122  $this->rights_class = 'agenda';
123  $r = 0;
124 
125  // $this->rights[$r][0] Id permission (unique tous modules confondus)
126  // $this->rights[$r][1] Libelle par defaut si traduction de cle "PermissionXXX" non trouvee (XXX = Id permission)
127  // $this->rights[$r][2] Non utilise
128  // $this->rights[$r][3] 1=Permis par defaut, 0=Non permis par defaut
129  // $this->rights[$r][4] Niveau 1 pour nommer permission dans code
130  // $this->rights[$r][5] Niveau 2 pour nommer permission dans code
131  // $r++;
132 
133  $this->rights[$r][0] = 2401;
134  $this->rights[$r][1] = 'Read actions/tasks linked to his account';
135  $this->rights[$r][2] = 'r';
136  $this->rights[$r][3] = 0;
137  $this->rights[$r][4] = 'myactions';
138  $this->rights[$r][5] = 'read';
139  $r++;
140 
141  $this->rights[$r][0] = 2402;
142  $this->rights[$r][1] = 'Create/modify actions/tasks linked to his account';
143  $this->rights[$r][2] = 'w';
144  $this->rights[$r][3] = 0;
145  $this->rights[$r][4] = 'myactions';
146  $this->rights[$r][5] = 'create';
147  $r++;
148 
149  $this->rights[$r][0] = 2403;
150  $this->rights[$r][1] = 'Delete actions/tasks linked to his account';
151  $this->rights[$r][2] = 'w';
152  $this->rights[$r][3] = 0;
153  $this->rights[$r][4] = 'myactions';
154  $this->rights[$r][5] = 'delete';
155  $r++;
156 
157  $this->rights[$r][0] = 2411;
158  $this->rights[$r][1] = 'Read actions/tasks of others';
159  $this->rights[$r][2] = 'r';
160  $this->rights[$r][3] = 0;
161  $this->rights[$r][4] = 'allactions';
162  $this->rights[$r][5] = 'read';
163  $r++;
164 
165  $this->rights[$r][0] = 2412;
166  $this->rights[$r][1] = 'Create/modify actions/tasks of others';
167  $this->rights[$r][2] = 'w';
168  $this->rights[$r][3] = 0;
169  $this->rights[$r][4] = 'allactions';
170  $this->rights[$r][5] = 'create';
171  $r++;
172 
173  $this->rights[$r][0] = 2413;
174  $this->rights[$r][1] = 'Delete actions/tasks of others';
175  $this->rights[$r][2] = 'w';
176  $this->rights[$r][3] = 0;
177  $this->rights[$r][4] = 'allactions';
178  $this->rights[$r][5] = 'delete';
179  $r++;
180 
181  $this->rights[$r][0] = 2414;
182  $this->rights[$r][1] = 'Export actions/tasks of others';
183  $this->rights[$r][2] = 'w';
184  $this->rights[$r][3] = 0;
185  $this->rights[$r][4] = 'export';
186 
187  // Main menu entries
188  $this->menu = array(); // List of menus to add
189  $r = 0;
190 
191  // Add here entries to declare new menus
192  // Example to declare the Top Menu entry:
193  // $this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu
194  // 'type'=>'top', // This is a Top menu entry
195  // 'titre'=>'MyModule top menu',
196  // 'mainmenu'=>'mymodule',
197  // 'url'=>'/mymodule/pagetop.php',
198  // 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
199  // 'position'=>100,
200  // 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
201  // 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
202  // 'target'=>'',
203  // 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
204  // $r++;
205  $this->menu[$r] = array(
206  'fk_menu'=>0,
207  'type'=>'top',
208  'titre'=>'TMenuAgenda',
209  'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
210  'mainmenu'=>'agenda',
211  'url'=>'/comm/action/index.php',
212  'langs'=>'agenda',
213  'position'=>86,
214  'perms'=>'$user->rights->agenda->myactions->read || $user->rights->resource->read',
215  'enabled'=>'$conf->agenda->enabled || $conf->resource->enabled',
216  'target'=>'',
217  'user'=>2,
218  );
219  $r++;
220 
221  $this->menu[$r] = array(
222  'fk_menu'=>'r=0',
223  'type'=>'left',
224  'titre'=>'Actions',
225  'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
226  'mainmenu'=>'agenda',
227  'url'=>'/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda',
228  'langs'=>'agenda',
229  'position'=>100,
230  'perms'=>'$user->rights->agenda->myactions->read',
231  'enabled'=>'$conf->agenda->enabled',
232  'target'=>'',
233  'user'=>2,
234  );
235  $r++;
236  $this->menu[$r] = array(
237  'fk_menu'=>'r=1',
238  'type'=>'left',
239  'titre'=>'NewAction',
240  'mainmenu'=>'agenda',
241  'url'=>'/comm/action/card.php?mainmenu=agenda&amp;leftmenu=agenda&amp;action=create',
242  'langs'=>'commercial',
243  'position'=>101,
244  'perms'=>'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)',
245  'enabled'=>'$conf->agenda->enabled',
246  'target'=>'',
247  'user'=>2
248  );
249  $r++;
250  // Calendar
251  $this->menu[$r] = array(
252  'fk_menu'=>'r=1',
253  'type'=>'left',
254  'titre'=>'Calendar',
255  'mainmenu'=>'agenda',
256  'url'=>'/comm/action/index.php?action=default&amp;mainmenu=agenda&amp;leftmenu=agenda',
257  'langs'=>'agenda',
258  'position'=>140,
259  'perms'=>'$user->rights->agenda->myactions->read',
260  'enabled'=>'$conf->agenda->enabled',
261  'target'=>'',
262  'user'=>2
263  );
264  $r++;
265  $this->menu[$r] = array(
266  'fk_menu'=>'r=3',
267  'type'=>'left',
268  'titre'=>'MenuToDoMyActions',
269  'mainmenu'=>'agenda',
270  'url'=>'/comm/action/index.php?action=default&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filter=mine',
271  'langs'=>'agenda',
272  'position'=>141,
273  'perms'=>'$user->rights->agenda->myactions->read',
274  'enabled'=>'$conf->agenda->enabled',
275  'target'=>'',
276  'user'=>2
277  );
278  $r++;
279  $this->menu[$r] = array(
280  'fk_menu'=>'r=3',
281  'type'=>'left',
282  'titre'=>'MenuDoneMyActions',
283  'mainmenu'=>'agenda',
284  'url'=>'/comm/action/index.php?action=default&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filter=mine',
285  'langs'=>'agenda',
286  'position'=>142,
287  'perms'=>'$user->rights->agenda->myactions->read',
288  'enabled'=>'$conf->agenda->enabled',
289  'target'=>'',
290  'user'=>2
291  );
292  $r++;
293  $this->menu[$r] = array(
294  'fk_menu'=>'r=3',
295  'type'=>'left',
296  'titre'=>'MenuToDoActions',
297  'mainmenu'=>'agenda',
298  'url'=>'/comm/action/index.php?action=default&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filtert=-1',
299  'langs'=>'agenda',
300  'position'=>143,
301  'perms'=>'$user->rights->agenda->allactions->read',
302  'enabled'=>'$user->rights->agenda->allactions->read',
303  'target'=>'',
304  'user'=>2
305  );
306  $r++;
307  $this->menu[$r] = array(
308  'fk_menu'=>'r=3',
309  'type'=>'left',
310  'titre'=>'MenuDoneActions',
311  'mainmenu'=>'agenda',
312  'url'=>'/comm/action/index.php?action=default&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filtert=-1',
313  'langs'=>'agenda',
314  'position'=>144,
315  'perms'=>'$user->rights->agenda->allactions->read',
316  'enabled'=>'$user->rights->agenda->allactions->read',
317  'target'=>'',
318  'user'=>2
319  );
320 
321  // List
322  $r++;
323  $this->menu[$r] = array(
324  'fk_menu'=>'r=1',
325  'type'=>'left',
326  'titre'=>'List',
327  'mainmenu'=>'agenda',
328  'url'=>'/comm/action/list.php?mode=show_list&amp;mainmenu=agenda&amp;leftmenu=agenda',
329  'langs'=>'agenda',
330  'position'=>110,
331  'perms'=>'$user->rights->agenda->myactions->read',
332  'enabled'=>'$conf->agenda->enabled',
333  'target'=>'',
334  'user'=>2
335  );
336  $r++;
337  $this->menu[$r] = array(
338  'fk_menu'=>'r=8',
339  'type'=>'left',
340  'titre'=>'MenuToDoMyActions',
341  'mainmenu'=>'agenda',
342  'url'=>'/comm/action/list.php?mode=show_list&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filter=mine',
343  'langs'=>'agenda',
344  'position'=>111,
345  'perms'=>'$user->rights->agenda->myactions->read',
346  'enabled'=>'$conf->agenda->enabled',
347  'target'=>'',
348  'user'=>2
349  );
350  $r++;
351  $this->menu[$r] = array(
352  'fk_menu'=>'r=8',
353  'type'=>'left',
354  'titre'=>'MenuDoneMyActions',
355  'mainmenu'=>'agenda',
356  'url'=>'/comm/action/list.php?mode=show_list&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filter=mine',
357  'langs'=>'agenda',
358  'position'=>112,
359  'perms'=>'$user->rights->agenda->myactions->read',
360  'enabled'=>'$conf->agenda->enabled',
361  'target'=>'',
362  'user'=>2
363  );
364  $r++;
365  $this->menu[$r] = array(
366  'fk_menu'=>'r=8',
367  'type'=>'left',
368  'titre'=>'MenuToDoActions',
369  'mainmenu'=>'agenda',
370  'url'=>'/comm/action/list.php?mode=show_list&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filtert=-1',
371  'langs'=>'agenda',
372  'position'=>113,
373  'perms'=>'$user->rights->agenda->allactions->read',
374  'enabled'=>'$user->rights->agenda->allactions->read',
375  'target'=>'',
376  'user'=>2
377  );
378  $r++;
379  $this->menu[$r] = array(
380  'fk_menu'=>'r=8',
381  'type'=>'left',
382  'titre'=>'MenuDoneActions',
383  'mainmenu'=>'agenda',
384  'url'=>'/comm/action/list.php?mode=show_list&amp;mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filtert=-1',
385  'langs'=>'agenda',
386  'position'=>114,
387  'perms'=>'$user->rights->agenda->allactions->read',
388  'enabled'=>'$user->rights->agenda->allactions->read',
389  'target'=>'',
390  'user'=>2
391  );
392  $r++;
393  // Reports
394  $this->menu[$r] = array(
395  'fk_menu'=>'r=1',
396  'type'=>'left',
397  'titre'=>'Reportings',
398  'mainmenu'=>'agenda',
399  'url'=>'/comm/action/rapport/index.php?mainmenu=agenda&amp;leftmenu=agenda',
400  'langs'=>'agenda',
401  'position'=>160,
402  'perms'=>'$user->rights->agenda->allactions->read',
403  'enabled'=>'$conf->agenda->enabled',
404  'target'=>'',
405  'user'=>2
406  );
407  $r++;
408  // Categories
409  $this->menu[$r] = array(
410  'fk_menu' => 'r=1',
411  'type' => 'left',
412  'titre' => 'Categories',
413  'mainmenu' => 'agenda',
414  'url'=>'/categories/index.php?mainmenu=agenda&amp;leftmenu=agenda&type=10',
415  'langs' => 'agenda',
416  'position' => 170,
417  'perms' => '$user->rights->agenda->allactions->read',
418  'enabled' => '$conf->categorie->enabled',
419  'target' => '',
420  'user' => 2
421  );
422  $r++;
423 
424 
425  // Exports
426  //--------
427  $r = 0;
428 
429  $r++;
430  $this->export_code[$r] = $this->rights_class.'_'.$r;
431  $this->export_label[$r] = "ExportDataset_event1";
432  $this->export_permission[$r] = array(array("agenda", "export"));
433  $this->export_fields_array[$r] = array('ac.id'=>"IdAgenda", 'ac.ref_ext'=>"ExternalRef", 'ac.datec'=>"DateCreation", 'ac.datep'=>"DateActionBegin",
434  'ac.datep2'=>"DateActionEnd", 'ac.label'=>"Title", 'ac.note'=>"Note", 'ac.percent'=>"Percent", 'ac.durationp'=>"Duration",
435  'cac.libelle'=>"ActionType",
436  's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town',
437  'co.code'=>'CountryCode', 's.phone'=>'Phone', 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6',
438  's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
439  'p.ref' => 'ProjectRef',
440  );
441  $this->export_TypeFields_array[$r] = array('ac.ref_ext'=>"Text", 'ac.datec'=>"Date", 'ac.datep'=>"Date",
442  'ac.datep2'=>"Date", 'ac.label'=>"Text", 'ac.note'=>"Text", 'ac.percent'=>"Numeric",
443  'ac.durationp'=>"Duree",
444  'cac.libelle'=>"List:c_actioncomm:libelle:libelle",
445  's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text',
446  'co.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text',
447  's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
448  'p.ref' => 'Text',
449  );
450  $this->export_entities_array[$r] = array('ac.id'=>"action", 'ac.ref_ext'=>"action", 'ac.datec'=>"action", 'ac.datep'=>"action",
451  'ac.datep2'=>"action", 'ac.label'=>"action", 'ac.note'=>"action", 'ac.percent'=>"action", 'ac.durationp'=>"action",
452  'cac.libelle'=>"action",
453  's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company',
454  'co.code'=>'company', 's.phone'=>'company', 's.siren'=>'company', 's.siret'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.idprof5'=>'company', 's.idprof6'=>'company',
455  's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company', 's.tva_intra'=>'company',
456  'p.ref' => 'project',
457  );
458 
459  $keyforselect = 'actioncomm'; $keyforelement = 'action'; $keyforaliasextra = 'extra';
460  include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
461 
462  $this->export_sql_start[$r] = 'SELECT DISTINCT ';
463  $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'actioncomm as ac';
464  $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_extrafields as extra ON ac.id = extra.fk_object';
465  $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_actioncomm as cac on ac.fk_action = cac.id';
466  if (!empty($user) && empty($user->rights->agenda->allactions->read)) {
467  $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_resources acr on ac.id = acr.fk_actioncomm';
468  }
469  $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp on ac.fk_contact = sp.rowid';
470  $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s on ac.fk_soc = s.rowid';
471  if (!empty($user) && empty($user->rights->societe->client->voir)) {
472  $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
473  }
474  $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co on s.fk_pays = co.rowid';
475  $this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = ac.fk_project";
476  $this->export_sql_end[$r] .= ' WHERE ac.entity IN ('.getEntity('agenda').')';
477  if (empty($user->rights->societe->client->voir)) {
478  $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.(empty($user) ? 0 : $user->id).' OR ac.fk_soc IS NULL)';
479  }
480  if (empty($user->rights->agenda->allactions->read)) {
481  $this->export_sql_end[$r] .= ' AND acr.fk_element = '.(empty($user) ? 0 : $user->id);
482  }
483  $this->export_sql_order[$r] = ' ORDER BY ac.datep';
484  }
485 }
Class DolibarrModules.
Class to describe and enable/disable module Agenda.
__construct($db)
Constructor.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("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->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:745
print *****$script_file(".$version.") pid cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:122
$conf db
API class for accounts.
Definition: inc.php:41