dolibarr  16.0.5
supplier_invoice.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2013 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.facture.class.php';
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array("admin", "other", "orders"));
39 
40 if (!$user->admin) {
42 }
43 
44 $type = GETPOST('type', 'alpha');
45 $value = GETPOST('value', 'alpha');
46 $action = GETPOST('action', 'aZ09');
47 
48 $label = GETPOST('label', 'alpha');
49 $scandir = GETPOST('scan_dir', 'alpha');
50 
51 $specimenthirdparty = new Societe($db);
52 $specimenthirdparty->initAsSpecimen();
53 
54 
55 /*
56  * Actions
57  */
58 
59 if ($action == 'updateMask') {
60  $maskconstinvoice = GETPOST('maskconstinvoice', 'alpha');
61  $maskconstcredit = GETPOST('maskconstcredit', 'alpha');
62  $maskconstdeposit = GETPOST('maskconstdeposit', 'alpha');
63  $maskinvoice = GETPOST('maskinvoice', 'alpha');
64  $maskcredit = GETPOST('maskcredit', 'alpha');
65  $maskdeposit = GETPOST('maskdeposit', 'alpha');
66 
67  if ($maskconstinvoice) {
68  $res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity);
69  }
70  if ($maskconstcredit) {
71  $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity);
72  }
73  if ($maskconstdeposit) {
74  $res = dolibarr_set_const($db, $maskconstdeposit, $maskdeposit, 'chaine', 0, '', $conf->entity);
75  }
76 
77  if (!($res > 0)) {
78  $error++;
79  }
80 
81  if (!$error) {
82  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
83  } else {
84  setEventMessages($langs->trans("Error"), null, 'errors');
85  }
86 }
87 
88 if ($action == 'specimen') { // For invoices
89  $modele = GETPOST('module', 'alpha');
90 
91  $facture = new FactureFournisseur($db);
92  $facture->initAsSpecimen();
93  $facture->thirdparty = $specimenthirdparty; // Define who should has build the invoice (so the supplier)
94 
95  // Search template files
96  $file = ''; $classname = ''; $filefound = 0;
97  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
98  foreach ($dirmodels as $reldir) {
99  $file = dol_buildpath($reldir."core/modules/supplier_invoice/doc/pdf_".$modele.".modules.php", 0);
100  if (file_exists($file)) {
101  $filefound = 1;
102  $classname = "pdf_".$modele;
103  break;
104  }
105  }
106 
107  if ($filefound) {
108  require_once $file;
109 
110  $module = new $classname($db, $facture);
111 
112  if ($module->write_file($facture, $langs) > 0) {
113  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf");
114  return;
115  } else {
116  setEventMessages($module->error, $module->errors, 'errors');
117  dol_syslog($module->error, LOG_ERR);
118  }
119  } else {
120  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
121  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
122  }
123 } elseif ($action == 'set') {
124  // Activate a model
125  $ret = addDocumentModel($value, $type, $label, $scandir);
126 } elseif ($action == 'del') {
127  $ret = delDocumentModel($value, $type);
128  if ($ret > 0) {
129  if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$value") {
130  dolibarr_del_const($db, 'INVOICE_SUPPLIER_ADDON_PDF', $conf->entity);
131  }
132  }
133 } elseif ($action == 'setdoc') {
134  // Set default model
135  if (dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
136  // La constante qui a ete lue en avant du nouveau set
137  // on passe donc par une variable pour avoir un affichage coherent
138  $conf->global->INVOICE_SUPPLIER_ADDON_PDF = $value;
139  }
140 
141  // On active le modele
142  $ret = delDocumentModel($value, $type);
143  if ($ret > 0) {
144  $ret = addDocumentModel($value, $type, $label, $scandir);
145  }
146 } elseif ($action == 'unsetdoc') {
147  dolibarr_del_const($db, "INVOICE_SUPPLIER_ADDON_PDF", $conf->entity);
148 }
149 
150 if ($action == 'setmod') {
151  // TODO Verifier si module numerotation choisi peut etre active
152  // par appel methode canBeActivated
153 
154  dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity);
155 }
156 
157 if ($action == 'addcat') {
158  $fourn = new Fournisseur($db);
159  $fourn->CreateCategory($user, GETPOST('cat', 'alphanohtml'));
160 }
161 
162 if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT') {
163  $freetext = GETPOST('SUPPLIER_INVOICE_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
164 
165  $res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
166 
167  if (!($res > 0)) {
168  $error++;
169  }
170 
171  if (!$error) {
172  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
173  } else {
174  setEventMessages($langs->trans("Error"), null, 'errors');
175  }
176 }
177 
178 
179 /*
180  * View
181  */
182 
183 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
184 
185 llxHeader("", "");
186 
187 $form = new Form($db);
188 
189 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
190 print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
191 
192 print "<br>";
193 
195 
196 print dol_get_fiche_head($head, 'invoice', $langs->trans("Suppliers"), -1, 'company');
197 
198 
199 // Supplier invoice numbering module
200 
201 print load_fiche_titre($langs->trans("SuppliersInvoiceNumberingModel"), '', '');
202 
203 print '<table class="noborder centpercent">';
204 print '<tr class="liste_titre">';
205 print '<td width="100">'.$langs->trans("Name").'</td>';
206 print '<td>'.$langs->trans("Description").'</td>';
207 print '<td>'.$langs->trans("Example").'</td>';
208 print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
209 print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
210 print "</tr>\n";
211 
212 clearstatcache();
213 
214 foreach ($dirmodels as $reldir) {
215  $dir = dol_buildpath($reldir."core/modules/supplier_invoice");
216 
217  if (is_dir($dir)) {
218  $handle = opendir($dir);
219  if (is_resource($handle)) {
220  while (($file = readdir($handle)) !== false) {
221  if (substr($file, 0, 24) == 'mod_facture_fournisseur_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
222  $file = substr($file, 0, dol_strlen($file) - 4);
223 
224  require_once $dir.'/'.$file.'.php';
225 
226  $module = new $file;
227 
228  if ($module->isEnabled()) {
229  // Show modules according to features level
230  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
231  continue;
232  }
233  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
234  continue;
235  }
236 
237 
238  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
239  print $module->info();
240  print '</td>';
241 
242  // Show example of numbering model
243  print '<td class="nowrap">';
244  $tmp = $module->getExample();
245  if (preg_match('/^Error/', $tmp)) {
246  $langs->load("errors");
247  print '<div class="error">'.$langs->trans($tmp).'</div>';
248  } elseif ($tmp == 'NotConfigured') {
249  print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
250  } else {
251  print $tmp;
252  }
253  print '</td>'."\n";
254 
255  print '<td class="center">';
256  if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file") {
257  print img_picto($langs->trans("Activated"), 'switch_on');
258  } else {
259  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>';
260  }
261  print '</td>';
262 
263  $invoice = new FactureFournisseur($db);
264  $invoice->initAsSpecimen();
265 
266  // Info
267  $htmltooltip = '';
268  $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
269  $nextval = $module->getNextValue($mysoc, $invoice);
270  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
271  $htmltooltip .= ''.$langs->trans("NextValue").': ';
272  if ($nextval) {
273  if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
274  $nextval = $langs->trans($nextval);
275  }
276  $htmltooltip .= $nextval.'<br>';
277  } else {
278  $htmltooltip .= $langs->trans($module->error).'<br>';
279  }
280  }
281 
282  print '<td class="center">';
283  print $form->textwithpicto('', $htmltooltip, 1, 0);
284  print '</td>';
285 
286  print '</tr>';
287  }
288  }
289  }
290  closedir($handle);
291  }
292  }
293 }
294 
295 print '</table><br>';
296 
297 
298 
299 
300 /*
301  * Modeles documents for supplier invoices
302  */
303 
304 print load_fiche_titre($langs->trans("BillsPDFModules"), '', '');
305 
306 // Defini tableau def de modele
307 $def = array();
308 
309 $sql = "SELECT nom";
310 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
311 $sql .= " WHERE type = 'invoice_supplier'";
312 $sql .= " AND entity = ".$conf->entity;
313 
314 $resql = $db->query($sql);
315 if ($resql) {
316  $i = 0;
317  $num_rows = $db->num_rows($resql);
318  while ($i < $num_rows) {
319  $array = $db->fetch_array($resql);
320  array_push($def, $array[0]);
321  $i++;
322  }
323 } else {
324  dol_print_error($db);
325 }
326 
327 print '<table class="noborder centpercent">'."\n";
328 print '<tr class="liste_titre">'."\n";
329 print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
330 print '<td>'.$langs->trans("Description").'</td>'."\n";
331 print '<td align="center" width="60">'.$langs->trans("Status").'</td>'."\n";
332 print '<td align="center" width="60">'.$langs->trans("Default").'</td>'."\n";
333 print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
334 print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
335 print '</tr>'."\n";
336 
337 clearstatcache();
338 
339 foreach ($dirmodels as $reldir) {
340  $realpath = $reldir."core/modules/supplier_invoice/doc";
341  $dir = dol_buildpath($realpath);
342 
343  if (is_dir($dir)) {
344  $handle = opendir($dir);
345 
346 
347  if (is_resource($handle)) {
348  while (($file = readdir($handle)) !== false) {
349  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
350  $name = substr($file, 4, dol_strlen($file) - 16);
351  $classname = substr($file, 0, dol_strlen($file) - 12);
352 
353  require_once $dir.'/'.$file;
354  $module = new $classname($db, new FactureFournisseur($db));
355 
356 
357  print "<tr class=\"oddeven\">\n";
358  print "<td>";
359  print (empty($module->name) ? $name : $module->name);
360  print "</td>\n";
361  print "<td>\n";
362  require_once $dir.'/'.$file;
363  $module = new $classname($db, $specimenthirdparty);
364  if (method_exists($module, 'info')) {
365  print $module->info($langs);
366  } else {
367  print $module->description;
368  }
369 
370  print "</td>\n";
371 
372  // Active
373  if (in_array($name, $def)) {
374  print '<td class="center">'."\n";
375  //if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
376  //{
377  // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
378  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&amp;type=invoice_supplier">';
379  print img_picto($langs->trans("Enabled"), 'switch_on');
380  print '</a>';
381  /*}
382  else
383  {
384  print img_picto($langs->trans("Enabled"),'switch_on');
385  }*/
386  print "</td>";
387  } else {
388  print '<td class="center">'."\n";
389  print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&amp;type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
390  print "</td>";
391  }
392 
393  // Default
394  print '<td class="center">';
395  if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name") {
396  //print img_picto($langs->trans("Default"),'on');
397  // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
398  print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
399  } else {
400  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
401  }
402  print '</td>';
403 
404  // Info
405  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
406  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
407  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
408  $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
409 
410  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
411  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
412  $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
413  $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
414  print '<td class="center">';
415  print $form->textwithpicto('', $htmltooltip, 1, 0);
416  print '</td>';
417  print '<td class="center">';
418  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
419  print '</td>';
420 
421  print "</tr>\n";
422  }
423  }
424 
425  closedir($handle);
426  }
427  }
428 }
429 
430 print '</table><br>';
431 
432 /*
433  * Other options
434  */
435 
436 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
437 print '<input type="hidden" name="token" value="'.newToken().'">';
438 print '<input type="hidden" name="action" value="set_SUPPLIER_INVOICE_FREE_TEXT">';
439 
440 print load_fiche_titre($langs->trans("OtherOptions"), '', '');
441 print '<table class="noborder centpercent">';
442 print '<tr class="liste_titre">';
443 print '<td>'.$langs->trans("Parameter").'</td>';
444 print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
445 print '<td width="80">&nbsp;</td>';
446 print "</tr>\n";
447 
448 $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
449 $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
450 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
451 foreach ($substitutionarray as $key => $val) {
452  $htmltext .= $key.'<br>';
453 }
454 $htmltext .= '</i>';
455 
456 print '<tr class="oddeven"><td colspan="2">';
457 print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
458 $variablename = 'SUPPLIER_INVOICE_FREE_TEXT';
459 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
460  print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
461 } else {
462  include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
463  $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
464  print $doleditor->Create();
465 }
466 print '</td><td class="right">';
467 print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
468 print "</td></tr>\n";
469 
470 print '</table><br>';
471 
472 print '</form>';
473 
474 
475 /*
476  * Notifications
477  */
478 
479 print load_fiche_titre($langs->trans("Notifications"), '', '');
480 print '<table class="noborder centpercent">';
481 print '<tr class="liste_titre">';
482 print '<td>'.$langs->trans("Parameter").'</td>';
483 print '<td align="center" width="60"></td>';
484 print '<td width="80">&nbsp;</td>';
485 print "</tr>\n";
486 
487 print '<tr class="oddeven"><td colspan="2">';
488 print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
489 print '</td><td class="right">';
490 print "</td></tr>\n";
491 
492 print '</table>';
493 
494 // End of page
495 llxFooter();
496 $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
FactureFournisseur
Class to manage suppliers invoices.
Definition: fournisseur.facture.class.php:53
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
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
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
supplierorder_admin_prepare_head
supplierorder_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: fourn.lib.php:241
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
$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