dolibarr  16.0.5
supplier_order.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
6  * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
7  * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
8  * Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <https://www.gnu.org/licenses/>.
22  */
23 
30 require '../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
34 require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
35 require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array("admin", "other", "orders", "stocks"));
39 
40 if (!$user->admin) {
42 }
43 
44 $type = GETPOST('type', 'alpha');
45 $value = GETPOST('value', 'alpha');
46 $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
47 
48 $label = GETPOST('label', 'alpha');
49 $action = GETPOST('action', 'aZ09');
50 $scandir = GETPOST('scan_dir', 'alpha');
51 
52 $specimenthirdparty = new Societe($db);
53 $specimenthirdparty->initAsSpecimen();
54 
55 
56 /*
57  * Actions
58  */
59 
60 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
61 
62 if ($action == 'updateMask') {
63  $maskconstorder = GETPOST('maskconstorder', 'alpha');
64  $maskvalue = GETPOST('maskorder', 'alpha');
65 
66  if ($maskconstorder) {
67  $res = dolibarr_set_const($db, $maskconstorder, $maskvalue, 'chaine', 0, '', $conf->entity);
68  }
69 
70  if (!($res > 0)) {
71  $error++;
72  }
73 
74  if (!$error) {
75  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
76  } else {
77  setEventMessages($langs->trans("Error"), null, 'errors');
78  }
79 } elseif ($action == 'specimen') { // For orders
80  $modele = GETPOST('module', 'alpha');
81 
82  $commande = new CommandeFournisseur($db);
83  $commande->initAsSpecimen();
84  $commande->thirdparty = $specimenthirdparty;
85 
86  // Search template files
87  $file = ''; $classname = ''; $filefound = 0;
88  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
89  foreach ($dirmodels as $reldir) {
90  $file = dol_buildpath($reldir."core/modules/supplier_order/doc/pdf_".$modele.".modules.php", 0);
91  if (file_exists($file)) {
92  $filefound = 1;
93  $classname = "pdf_".$modele;
94  break;
95  }
96  }
97 
98  if ($filefound) {
99  require_once $file;
100 
101  $module = new $classname($db, $commande);
102 
103  if ($module->write_file($commande, $langs) > 0) {
104  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
105  return;
106  } else {
107  setEventMessages($module->error, $module->errors, 'errors');
108  dol_syslog($module->error, LOG_ERR);
109  }
110  } else {
111  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
112  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
113  }
114 } elseif ($action == 'set') {
115  // Activate a model
116  $ret = addDocumentModel($value, $type, $label, $scandir);
117 } elseif ($action == 'del') {
118  $ret = delDocumentModel($value, $type);
119  if ($ret > 0) {
120  if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$value") {
121  dolibarr_del_const($db, 'COMMANDE_SUPPLIER_ADDON_PDF', $conf->entity);
122  }
123  }
124 } elseif ($action == 'setdoc') {
125  // Set default model
126  if (dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
127  // La constante qui a ete lue en avant du nouveau set
128  // on passe donc par une variable pour avoir un affichage coherent
129  $conf->global->COMMANDE_SUPPLIER_ADDON_PDF = $value;
130  }
131 
132  // On active le modele
133  $ret = delDocumentModel($value, $type);
134  if ($ret > 0) {
135  $ret = addDocumentModel($value, $type, $label, $scandir);
136  }
137 } elseif ($action == 'unsetdoc') {
138  dolibarr_del_const($db, "COMMANDE_SUPPLIER_ADDON_PDF", $conf->entity);
139 } elseif ($action == 'setmod') {
140  // TODO Verifier si module numerotation choisi peut etre active
141  // par appel methode canBeActivated
142 
143  dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity);
144 } elseif ($action == 'addcat') {
145  $fourn = new Fournisseur($db);
146  $fourn->CreateCategory($user, GETPOST('cat', 'alphanohtml'));
147 } elseif ($action == 'set_SUPPLIER_ORDER_OTHER') {
148  $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
149  $doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED', 'alpha');
150  $doubleapproval = price2num($doubleapproval);
151 
152  $res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
153  $res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED", $doubleapproval, 'chaine', 0, '', $conf->entity);
154 
155  // TODO We add/delete permission here until permission can have a condition on a global var
156  include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
157  $newmodule = new modFournisseur($db);
158 
159  if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) {
160  // clear default rights array
161  $newmodule->rights = array();
162  // add new right
163  $r = 0;
164  $newmodule->rights[$r][0] = 1190;
165  $newmodule->rights[$r][1] = $langs->trans("Permission1190");
166  $newmodule->rights[$r][2] = 'w';
167  $newmodule->rights[$r][3] = 0;
168  $newmodule->rights[$r][4] = 'commande';
169  $newmodule->rights[$r][5] = 'approve2';
170 
171  // Insert
172  $newmodule->insert_permissions(1);
173  } else {
174  // Remove all rights with Permission1190
175  $newmodule->delete_permissions();
176 
177  // Add all right without Permission1190
178  $newmodule->insert_permissions(1);
179  }
180 } elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') {
181  // Activate ask for payment bank
182  $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER", $value, 'chaine', 0, '', $conf->entity);
183 
184  if (!($res > 0)) {
185  $error++;
186  }
187 
188  if (!$error) {
189  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
190  } else {
191  setEventMessages($langs->trans("Error"), null, 'errors');
192  }
193 }
194 
195 
196 /*
197  * View
198  */
199 
200 $form = new Form($db);
201 
202 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
203 
204 llxHeader("", "");
205 
206 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
207 print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
208 
209 print "<br>";
210 
212 
213 print dol_get_fiche_head($head, 'order', $langs->trans("Suppliers"), -1, 'company');
214 
215 
216 // Supplier order numbering module
217 
218 print load_fiche_titre($langs->trans("OrdersNumberingModules"), '', '');
219 
220 print '<table class="noborder centpercent">';
221 print '<tr class="liste_titre">';
222 print '<td width="100">'.$langs->trans("Name").'</td>';
223 print '<td>'.$langs->trans("Description").'</td>';
224 print '<td>'.$langs->trans("Example").'</td>';
225 print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
226 print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
227 print "</tr>\n";
228 
229 clearstatcache();
230 
231 foreach ($dirmodels as $reldir) {
232  $dir = dol_buildpath($reldir."core/modules/supplier_order/");
233 
234  if (is_dir($dir)) {
235  $handle = opendir($dir);
236  if (is_resource($handle)) {
237  while (($file = readdir($handle)) !== false) {
238  if (substr($file, 0, 25) == 'mod_commande_fournisseur_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
239  $file = substr($file, 0, dol_strlen($file) - 4);
240 
241  require_once $dir.$file.'.php';
242 
243  $module = new $file;
244 
245  if ($module->isEnabled()) {
246  // Show modules according to features level
247  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
248  continue;
249  }
250  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
251  continue;
252  }
253 
254 
255  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
256  print $module->info();
257  print '</td>';
258 
259  // Show example of numbering module
260  print '<td class="nowrap">';
261  $tmp = $module->getExample();
262  if (preg_match('/^Error/', $tmp)) {
263  $langs->load("errors");
264  print '<div class="error">'.$langs->trans($tmp).'</div>';
265  } elseif ($tmp == 'NotConfigured') {
266  print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
267  } else {
268  print $tmp;
269  }
270  print '</td>'."\n";
271 
272  print '<td class="center">';
273  if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file") {
274  print img_picto($langs->trans("Activated"), 'switch_on');
275  } else {
276  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
277  }
278  print '</td>';
279 
280  $commande = new CommandeFournisseur($db);
281  $commande->initAsSpecimen();
282 
283  // Info
284  $htmltooltip = '';
285  $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
286  $nextval = $module->getNextValue($mysoc, $commande);
287  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
288  $htmltooltip .= ''.$langs->trans("NextValue").': ';
289  if ($nextval) {
290  if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
291  $nextval = $langs->trans($nextval);
292  }
293  $htmltooltip .= $nextval.'<br>';
294  } else {
295  $htmltooltip .= $langs->trans($module->error).'<br>';
296  }
297  }
298 
299  print '<td class="center">';
300  print $form->textwithpicto('', $htmltooltip, 1, 0);
301  print '</td>';
302 
303  print '</tr>';
304  }
305  }
306  }
307  closedir($handle);
308  }
309  }
310 }
311 
312 print '</table><br>';
313 
314 
315 /*
316  * Documents models for supplier orders
317  */
318 
319 print load_fiche_titre($langs->trans("OrdersModelModule"), '', '');
320 
321 // Defini tableau def de modele
322 $def = array();
323 
324 $sql = "SELECT nom";
325 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
326 $sql .= " WHERE type = 'order_supplier'";
327 $sql .= " AND entity = ".$conf->entity;
328 
329 $resql = $db->query($sql);
330 if ($resql) {
331  $i = 0;
332  $num_rows = $db->num_rows($resql);
333  while ($i < $num_rows) {
334  $array = $db->fetch_array($resql);
335  array_push($def, $array[0]);
336  $i++;
337  }
338 } else {
339  dol_print_error($db);
340 }
341 
342 print '<table class="noborder centpercent">'."\n";
343 print '<tr class="liste_titre">'."\n";
344 print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
345 print '<td>'.$langs->trans("Description").'</td>'."\n";
346 print '<td align="center" width="60">'.$langs->trans("Status").'</td>'."\n";
347 print '<td align="center" width="60">'.$langs->trans("Default").'</td>'."\n";
348 print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
349 print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
350 print '</tr>'."\n";
351 
352 clearstatcache();
353 
354 foreach ($dirmodels as $reldir) {
355  $realpath = $reldir."core/modules/supplier_order/doc";
356  $dir = dol_buildpath($realpath);
357 
358  if (is_dir($dir)) {
359  $handle = opendir($dir);
360  if (is_resource($handle)) {
361  while (($file = readdir($handle)) !== false) {
362  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
363  $name = substr($file, 4, dol_strlen($file) - 16);
364  $classname = substr($file, 0, dol_strlen($file) - 12);
365 
366  require_once $dir.'/'.$file;
367  $module = new $classname($db, new CommandeFournisseur($db));
368 
369 
370  print "<tr class=\"oddeven\">\n";
371  print "<td>";
372  print (empty($module->name) ? $name : $module->name);
373  print "</td>\n";
374  print "<td>\n";
375  require_once $dir.'/'.$file;
376  $module = new $classname($db, $specimenthirdparty);
377  if (method_exists($module, 'info')) {
378  print $module->info($langs);
379  } else {
380  print $module->description;
381  }
382  print "</td>\n";
383 
384  // Active
385  if (in_array($name, $def)) {
386  print '<td class="center">'."\n";
387  if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name") {
388  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier">';
389  print img_picto($langs->trans("Enabled"), 'switch_on');
390  print '</a>';
391  } else {
392  print img_picto($langs->trans("Enabled"), 'switch_on');
393  }
394  print "</td>";
395  } else {
396  print '<td class="center">'."\n";
397  print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&amp;scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
398  print "</td>";
399  }
400 
401  // Default
402  print '<td class="center">';
403  if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") {
404  print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
405  } else {
406  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
407  }
408  print '</td>';
409 
410  // Info
411  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
412  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
413  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
414  $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
415 
416  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
417  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
418  $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
419  $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
420  print '<td class="center">';
421  print $form->textwithpicto('', $htmltooltip, 1, 0);
422  print '</td>';
423  print '<td class="center">';
424  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
425  print '</td>';
426 
427  print "</tr>\n";
428  }
429  }
430 
431  closedir($handle);
432  }
433  }
434 }
435 
436 print '</table><br>';
437 
438 /*
439  * Other options
440  */
441 
442 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
443 print '<input type="hidden" name="token" value="'.newToken().'">';
444 print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_OTHER">';
445 
446 print load_fiche_titre($langs->trans("OtherOptions"), '', '');
447 print '<table class="noborder centpercent">';
448 print '<tr class="liste_titre">';
449 print '<td>'.$langs->trans("Parameter").'</td>';
450 print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
451 print '<td width="80">&nbsp;</td>';
452 print "</tr>\n";
453 
454 print '<tr class="oddeven"><td>';
455 print $form->textwithpicto($langs->trans("UseDoubleApproval"), $langs->trans("Use3StepsApproval"), 1, 'help').'<br>';
456 print $langs->trans("IfSetToYesDontForgetPermission");
457 print '</td><td>';
458 print '<input type="text" size="6" name="SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED" value="'.$conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED.'">';
459 print '</td><td class="right">';
460 print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
461 print "</td></tr>\n";
462 
463 
464 // Ask for payment bank during supplier order
465 /* Kept as hidden for the moment
466 if (isModEnabled('banque')) {
467 
468  print '<tr class="oddeven"><td>';
469  print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td>&nbsp;</td><td align="center">';
470  if (! empty($conf->use_javascript_ajax))
471  {
472  print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER');
473  }
474  else
475  {
476  if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER))
477  {
478  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
479  }
480  else
481  {
482  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
483  }
484  }
485  print '</td></tr>';
486 }
487 else
488 {
489 
490  print '<tr class="oddeven"><td>';
491  print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
492 }
493 */
494 
495 $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
496 $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
497 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
498 foreach ($substitutionarray as $key => $val) {
499  $htmltext .= $key.'<br>';
500 }
501 $htmltext .= '</i>';
502 
503 print '<tr class="oddeven"><td colspan="2">';
504 print $form->textwithpicto($langs->trans("FreeLegalTextOnOrders"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
505 $variablename = 'SUPPLIER_ORDER_FREE_TEXT';
506 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
507  print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
508 } else {
509  include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
510  $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
511  print $doleditor->Create();
512 }
513 print '</td><td class="right">';
514 print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
515 print "</td></tr>\n";
516 
517 // Option to add a quality/validation step, on products, after reception.
518 print '<tr class="oddeven">';
519 print '<td>'.$langs->trans("UseDispatchStatus").'</td>';
520 print '<td></td>';
521 print '<td class="center">';
522 if (isModEnabled('reception')) {
523  print '<span class="opacitymedium">'.$langs->trans("FeatureNotAvailableWithReceptionModule").'</span>';
524 } else {
525  if ($conf->use_javascript_ajax) {
526  print ajax_constantonoff('SUPPLIER_ORDER_USE_DISPATCH_STATUS');
527  } else {
528  $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
529  print $form->selectarray("SUPPLIER_ORDER_USE_DISPATCH_STATUS", $arrval, $conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS);
530  }
531 }
532 print "</td>\n";
533 print "</tr>\n";
534 
535 print '</table><br>';
536 
537 print '</form>';
538 
539 
540 /*
541  * Notifications
542  */
543 
544 print load_fiche_titre($langs->trans("Notifications"), '', '');
545 print '<table class="noborder centpercent">';
546 print '<tr class="liste_titre">';
547 print '<td>'.$langs->trans("Parameter").'</td>';
548 print '<td align="center" width="60"></td>';
549 print '<td width="80">&nbsp;</td>';
550 print "</tr>\n";
551 
552 print '<tr class="oddeven"><td colspan="2">';
553 print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
554 print '</td><td class="right">';
555 print "</td></tr>\n";
556 
557 print '</table>';
558 
559 // End of page
560 llxFooter();
561 $db->close();
Societe
Class to manage third parties objects (customers, suppliers, prospects...)
Definition: societe.class.php:48
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
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
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
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
price2num
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
Definition: functions.lib.php:5661
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
delDocumentModel
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1894
Fournisseur
Class to manage suppliers.
Definition: fournisseur.class.php:34
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1603
ajax_constantonoff
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0, $setzeroinsteadofdel=0, $suffix='', $mode='')
On/off button for constant.
Definition: ajax.lib.php:573
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
getDolGlobalString
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
Definition: functions.lib.php:80
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
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition: functions.lib.php:105
supplierorder_admin_prepare_head
supplierorder_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: fourn.lib.php:241
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
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
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
modFournisseur
Description and activation class for module Fournisseur.
Definition: modFournisseur.class.php:35
$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
pdf_getSubstitutionArray
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:737
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
DolEditor
Class to manage a WYSIWYG editor.
Definition: doleditor.class.php:30