dolibarr  9.0.0
fichinter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
5  * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
6  * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
7  * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
8  * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
9  * Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <http://www.gnu.org/licenses/>.
23  */
24 
31 require '../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
35 require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array('admin', 'errors', 'interventions', 'other'));
39 
40 if (! $user->admin) accessforbidden();
41 
42 $action = GETPOST('action','alpha');
43 $value = GETPOST('value','alpha');
44 $label = GETPOST('label','alpha');
45 $scandir = GETPOST('scan_dir','alpha');
46 $type='ficheinter';
47 
48 
49 /*
50  * Actions
51  */
52 
53 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
54 
55 if ($action == 'updateMask')
56 {
57  $maskconst=GETPOST('maskconst','alpha');
58  $maskvalue=GETPOST('maskvalue','alpha');
59  if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
60 
61  if (! $res > 0) $error++;
62 
63  if (! $error)
64  {
65  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
66  }
67  else
68  {
69  setEventMessages($langs->trans("Error"), null, 'errors');
70  }
71 }
72 
73 else if ($action == 'specimen') // For fiche inter
74 {
75  $modele= GETPOST('module','alpha');
76 
77  $inter = new Fichinter($db);
78  $inter->initAsSpecimen();
79 
80  // Search template files
81  $file=''; $classname=''; $filefound=0;
82  $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
83  foreach($dirmodels as $reldir)
84  {
85  $file=dol_buildpath($reldir."core/modules/fichinter/doc/pdf_".$modele.".modules.php",0);
86  if (file_exists($file))
87  {
88  $filefound=1;
89  $classname = "pdf_".$modele;
90  break;
91  }
92  }
93 
94  if ($filefound)
95  {
96  require_once $file;
97 
98  $module = new $classname($db);
99 
100  if ($module->write_file($inter,$langs) > 0)
101  {
102  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=ficheinter&file=SPECIMEN.pdf");
103  return;
104  }
105  else
106  {
107  setEventMessages($module->error, $module->errors, 'errors');
108  dol_syslog($module->error, LOG_ERR);
109  }
110  }
111  else
112  {
113  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
114  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
115  }
116 }
117 
118 // Activate a model
119 else if ($action == 'set')
120 {
121  $ret = addDocumentModel($value, $type, $label, $scandir);
122 }
123 
124 else if ($action == 'del')
125 {
126  $ret = delDocumentModel($value, $type);
127  if ($ret > 0)
128  {
129  if ($conf->global->FICHEINTER_ADDON_PDF == "$value") dolibarr_del_const($db, 'FICHEINTER_ADDON_PDF',$conf->entity);
130  }
131 }
132 
133 // Set default model
134 else if ($action == 'setdoc')
135 {
136  if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
137  {
138  // La constante qui a ete lue en avant du nouveau set
139  // on passe donc par une variable pour avoir un affichage coherent
140  $conf->global->FICHEINTER_ADDON_PDF = $value;
141  }
142 
143  // On active le modele
144  $ret = delDocumentModel($value, $type);
145  if ($ret > 0)
146  {
147  $ret = addDocumentModel($value, $type, $label, $scandir);
148  }
149 }
150 
151 else if ($action == 'setmod')
152 {
153  // TODO Verifier si module numerotation choisi peut etre active
154  // par appel methode canBeActivated
155 
156  dolibarr_set_const($db, "FICHEINTER_ADDON",$value,'chaine',0,'',$conf->entity);
157 }
158 
159 else if ($action == 'set_FICHINTER_FREE_TEXT')
160 {
161  $freetext= GETPOST('FICHINTER_FREE_TEXT','none'); // No alpha here, we want exact string
162  $res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
163 
164  if (! $res > 0) $error++;
165 
166  if (! $error)
167  {
168  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
169  }
170  else
171  {
172  setEventMessages($langs->trans("Error"), null, 'errors');
173  }
174 }
175 
176 else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
177 {
178  $draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
179  $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
180 
181  if (! $res > 0) $error++;
182 
183  if (! $error)
184  {
185  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
186  }
187  else
188  {
189  setEventMessages($langs->trans("Error"), null, 'errors');
190  }
191 }
192 
193 elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
194 {
195  $val = GETPOST('FICHINTER_PRINT_PRODUCTS','alpha');
196  $res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS",($val == 'on' ? 1 : 0),'bool',0,'',$conf->entity);
197 
198  if (! $res > 0) $error++;
199 
200  if (! $error)
201  {
202  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
203  }
204  else
205  {
206  setEventMessages($langs->trans("Error"), null, 'errors');
207  }
208 } elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
209  $val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
210  $res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
211  $conf->entity);
212 
213  if (!$res > 0) {
214  $error++;
215  }
216 
217  if (!$error) {
218  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
219  } else {
220  setEventMessages($langs->trans("Error"), null, 'errors');
221  }
222 } elseif ($action == 'set_FICHINTER_WITHOUT_DURATION') {
223  $val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha');
224  $res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
225  $conf->entity);
226 
227  if (!$res > 0) {
228  $error++;
229  }
230 
231  if (!$error) {
232  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
233  } else {
234  setEventMessages($langs->trans("Error"), null, 'errors');
235  }
236 } elseif ($action == 'set_FICHINTER_DATE_WITHOUT_HOUR') {
237  $val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha');
238  $res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '',
239  $conf->entity);
240 
241  if (!$res > 0) {
242  $error++;
243  }
244 
245  if (!$error) {
246  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
247  } else {
248  setEventMessages($langs->trans("Error"), null, 'errors');
249  }
250 }
251 
252 
253 
254 /*
255  * View
256  */
257 
258 $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
259 
260 llxHeader();
261 
262 $form=new Form($db);
263 
264 $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
265 print load_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'title_setup');
266 
267 
269 
270 dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), -1, 'intervention');
271 
272 // Interventions numbering model
273 
274 print load_fiche_titre($langs->trans("FicheinterNumberingModules"),'','');
275 
276 print '<table class="noborder" width="100%">';
277 print '<tr class="liste_titre">';
278 print '<td width="100">'.$langs->trans("Name").'</td>';
279 print '<td>'.$langs->trans("Description").'</td>';
280 print '<td>'.$langs->trans("Example").'</td>';
281 print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
282 print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
283 print "</tr>\n";
284 
285 clearstatcache();
286 
287 foreach ($dirmodels as $reldir)
288 {
289  $dir = dol_buildpath($reldir."core/modules/fichinter/");
290 
291  if (is_dir($dir))
292  {
293  $handle = opendir($dir);
294  if (is_resource($handle))
295  {
296 
297  while (($file = readdir($handle))!==false)
298  {
299  if (preg_match('/^(mod_.*)\.php$/i',$file,$reg))
300  {
301  $file = $reg[1];
302  $classname = substr($file,4);
303 
304  require_once $dir.$file.'.php';
305 
306  $module = new $file;
307 
308  if ($module->isEnabled())
309  {
310  // Show modules according to features level
311  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
312  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
313 
314 
315  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
316  print $module->info();
317  print '</td>';
318 
319  // Show example of numbering model
320  print '<td class="nowrap">';
321  $tmp=$module->getExample();
322  if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
323  elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
324  else print $tmp;
325  print '</td>'."\n";
326 
327  print '<td align="center">';
328  if ($conf->global->FICHEINTER_ADDON == $classname)
329  {
330  print img_picto($langs->trans("Activated"),'switch_on');
331  }
332  else
333  {
334  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
335  }
336  print '</td>';
337 
338  $ficheinter=new Fichinter($db);
339  $ficheinter->initAsSpecimen();
340 
341  // Info
342  $htmltooltip='';
343  $htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
344  $nextval=$module->getNextValue($mysoc,$ficheinter);
345  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
346  $htmltooltip.=''.$langs->trans("NextValue").': ';
347  if ($nextval) {
348  if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
349  $nextval = $langs->trans($nextval);
350  $htmltooltip.=$nextval.'<br>';
351  } else {
352  $htmltooltip.=$langs->trans($module->error).'<br>';
353  }
354  }
355  print '<td align="center">';
356  print $form->textwithpicto('',$htmltooltip,1,0);
357  print '</td>';
358 
359  print '</tr>';
360  }
361  }
362  }
363  closedir($handle);
364  }
365  }
366 }
367 
368 print '</table><br>';
369 
370 
371 /*
372  * Documents models for Interventions
373  */
374 
375 print load_fiche_titre($langs->trans("TemplatePDFInterventions"),'','');
376 
377 // Defini tableau def des modeles
378 $type='ficheinter';
379 $def = array();
380 $sql = "SELECT nom";
381 $sql.= " FROM ".MAIN_DB_PREFIX."document_model";
382 $sql.= " WHERE type = '".$type."'";
383 $sql.= " AND entity = ".$conf->entity;
384 $resql=$db->query($sql);
385 if ($resql)
386 {
387  $i = 0;
388  $num_rows=$db->num_rows($resql);
389  while ($i < $num_rows)
390  {
391  $array = $db->fetch_array($resql);
392  array_push($def, $array[0]);
393  $i++;
394  }
395 }
396 else
397 {
398  dol_print_error($db);
399 }
400 
401 
402 print '<table class="noborder" width="100%">';
403 print '<tr class="liste_titre">';
404 print '<td>'.$langs->trans("Name").'</td>';
405 print '<td>'.$langs->trans("Description").'</td>';
406 print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
407 print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
408 print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
409 print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
410 print "</tr>\n";
411 
412 clearstatcache();
413 
414 foreach ($dirmodels as $reldir)
415 {
416  $dir = dol_buildpath($reldir."core/modules/fichinter/doc/");
417 
418  if (is_dir($dir))
419  {
420  $handle=opendir($dir);
421  if (is_resource($handle))
422  {
423  while (($file = readdir($handle))!==false)
424  {
425  $filelist[]=$file;
426  }
427  closedir($handle);
428  arsort($filelist);
429 
430  foreach($filelist as $file)
431  {
432  if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
433  {
434  if (file_exists($dir.'/'.$file))
435  {
436 
437 
438  $name = substr($file, 4, dol_strlen($file) -16);
439  $classname = substr($file, 0, dol_strlen($file) -12);
440 
441  require_once $dir.'/'.$file;
442  $module = new $classname($db);
443 
444  $modulequalified=1;
445  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
446  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
447 
448  if ($modulequalified)
449  {
450  print '<tr class="oddeven"><td width="100">';
451  print (empty($module->name)?$name:$module->name);
452  print "</td><td>\n";
453  if (method_exists($module,'info')) print $module->info($langs);
454  else print $module->description;
455  print '</td>';
456 
457  // Active
458  if (in_array($name, $def))
459  {
460  print "<td align=\"center\">\n";
461  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">';
462  print img_picto($langs->trans("Enabled"),'switch_on');
463  print '</a>';
464  print "</td>";
465  }
466  else
467  {
468  print "<td align=\"center\">\n";
469  print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
470  print "</td>";
471  }
472 
473  // Default
474  print "<td align=\"center\">";
475  if ($conf->global->FICHEINTER_ADDON_PDF == "$name")
476  {
477  print img_picto($langs->trans("Default"),'on');
478  }
479  else
480  {
481  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
482  }
483  print '</td>';
484 
485  // Info
486  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
487  $htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
488  $htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
489  $htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
490  $htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
491  $htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
492  $htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
493  $htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
494  $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);
495  print '<td align="center">';
496  print $form->textwithpicto('',$htmltooltip,-1,0);
497  print '</td>';
498 
499  // Preview
500  print '<td align="center">';
501  if ($module->type == 'pdf')
502  {
503  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'intervention').'</a>';
504  }
505  else
506  {
507  print img_object($langs->trans("PreviewNotAvailable"),'generic');
508  }
509  print '</td>';
510 
511  print '</tr>';
512  }
513  }
514  }
515  }
516  }
517  }
518 }
519 
520 print '</table>';
521 print "<br>";
522 
523 /*
524  * Other options
525  */
526 
527 print load_fiche_titre($langs->trans("OtherOptions"),'','');
528 print '<table class="noborder" width="100%">';
529 print '<tr class="liste_titre">';
530 print '<td>'.$langs->trans("Parameter").'</td>';
531 print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
532 print "<td>&nbsp;</td>\n";
533 print "</tr>\n";
534 
535 $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
536 $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
537 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
538 foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
539 $htmltext.='</i>';
540 
541 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
542 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
543 print '<input type="hidden" name="action" value="set_FICHINTER_FREE_TEXT">';
544 print '<tr class="oddeven"><td colspan="2">';
545 print $form->textwithpicto($langs->trans("FreeLegalTextOnInterventions"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
546 $variablename='FICHINTER_FREE_TEXT';
547 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
548 {
549  print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
550 }
551 else
552 {
553  include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
554  $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
555  print $doleditor->Create();
556 }
557 print '</td><td align="right">';
558 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
559 print "</td></tr>\n";
560 print '</form>';
561 
562 //Use draft Watermark
563 print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
564 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
565 print "<input type=\"hidden\" name=\"action\" value=\"set_FICHINTER_DRAFT_WATERMARK\">";
566 print '<tr class="oddeven"><td>';
567 print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
568 print '</td><td>';
569 print '<input size="50" class="flat" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.$conf->global->FICHINTER_DRAFT_WATERMARK.'">';
570 print '</td><td align="right">';
571 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
572 print "</td></tr>\n";
573 print '</form>';
574 // print products on fichinter
575 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
576 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
577 print '<input type="hidden" name="action" value="set_FICHINTER_PRINT_PRODUCTS">';
578 print '<tr class="oddeven"><td>';
579 print $langs->trans("PrintProductsOnFichinter").' ('.$langs->trans("PrintProductsOnFichinterDetails").')</td>';
580 print '<td align="center"><input type="checkbox" name="FICHINTER_PRINT_PRODUCTS" ';
581 if ($conf->global->FICHINTER_PRINT_PRODUCTS)
582  print 'checked ';
583 print '/>';
584 print '</td><td align="right">';
585 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
586 print "</td></tr>\n";
587 print '</form>';
588 // Use services duration
589 print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
590 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
591 print '<input type="hidden" name="action" value="set_FICHINTER_USE_SERVICE_DURATION">';
592 print '<tr class="oddeven">';
593 print '<td>';
594 print $langs->trans("UseServicesDurationOnFichinter");
595 print '</td>';
596 print '<td align="center">';
597 print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"' . ($conf->global->FICHINTER_USE_SERVICE_DURATION?' checked':'') . '>';
598 print '</td>';
599 print '<td align="right">';
600 print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
601 print '</td>';
602 print '</tr>';
603 print '</form>';
604 // Use duration
605 print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
606 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
607 print '<input type="hidden" name="action" value="set_FICHINTER_WITHOUT_DURATION">';
608 print '<tr class="oddeven">';
609 print '<td>';
610 print $langs->trans("UseDurationOnFichinter");
611 print '</td>';
612 print '<td align="center">';
613 print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"' . ($conf->global->FICHINTER_WITHOUT_DURATION?' checked':'') . '>';
614 print '</td>';
615 print '<td align="right">';
616 print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
617 print '</td>';
618 print '</tr>';
619 print '</form>';
620 // use date without hour
621 print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
622 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
623 print '<input type="hidden" name="action" value="set_FICHINTER_DATE_WITHOUT_HOUR">';
624 print '<tr class="oddeven">';
625 print '<td>';
626 print $langs->trans("UseDateWithoutHourOnFichinter");
627 print '</td>';
628 print '<td align="center">';
629 print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"' . ($conf->global->FICHINTER_DATE_WITHOUT_HOUR?' checked':'') . '>';
630 print '</td>';
631 print '<td align="right">';
632 print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
633 print '</td>';
634 print '</tr>';
635 print '</form>';
636 
637 print '</table>';
638 
639 print '<br>';
640 
641 // End of page
642 llxFooter();
643 $db->close();
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1643
llxFooter()
Empty footer.
Definition: wrapper.php:56
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
print
Draft customers invoices.
Definition: index.php:91
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
if(! empty($conf->facture->enabled) && $user->rights->facture->lire) if(! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) if(! empty($conf->don->enabled) && $user->rights->societe->lire) if(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) if(! empty($conf->facture->enabled) &&! empty($conf->commande->enabled) && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(! empty($conf->facture->enabled) && $user->rights->facture->lire) if(! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1053
Class to manage interventions.
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:510
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1609
dol_print_error($db='', $error='', $errors=null)
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remonte...
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
if(! GETPOST('transkey', 'alphanohtml') &&! GETPOST('transphrase', 'alphanohtml')) else
View.
Definition: notice.php:43
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage generation of HTML components Only common components must be here.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='')
Write log message into outputs.
fichinter_admin_prepare_head()
Return array head with list of tabs to view object informations.
dolibarr_del_const($db, $name, $entity=1)
Effacement d&#39;une constante dans la base de donnees.
Definition: admin.lib.php:435
llxHeader()
Empty header.
Definition: wrapper.php:44
if(GETPOST('cancel', 'alpha')) if(! GETPOST( 'confirmmassaction', 'alpha') &&$massaction !='presend' &&$massaction !='confirm_presend')
Draft customers invoices.
Definition: list.php:156
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition: pdf.lib.php:623
Class to manage a WYSIWYG editor.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='')
Show picto whatever it&#39;s its name (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='')
Show tab header of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)