dolibarr  13.0.2
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 $type = GETPOST('type', 'alpha');
44 $value = GETPOST('value', 'alpha');
45 $action = GETPOST('action', 'aZ09');
46 
47 $label = GETPOST('label', 'alpha');
48 $scandir = GETPOST('scan_dir', 'alpha');
49 
50 $specimenthirdparty = new Societe($db);
51 $specimenthirdparty->initAsSpecimen();
52 
53 
54 /*
55  * Actions
56  */
57 
58 if ($action == 'updateMask')
59 {
60  $maskconstinvoice = GETPOST('maskconstinvoice', 'alpha');
61  $maskconstcredit = GETPOST('maskconstcredit', 'alpha');
62  $maskinvoice = GETPOST('maskinvoice', 'alpha');
63  $maskcredit = GETPOST('maskcredit', 'alpha');
64 
65  if ($maskconstinvoice) $res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity);
66  if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity);
67 
68  if (!($res > 0)) $error++;
69 
70  if (!$error)
71  {
72  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
73  } else {
74  setEventMessages($langs->trans("Error"), null, 'errors');
75  }
76 }
77 
78 if ($action == 'specimen') // For invoices
79 {
80  $modele = GETPOST('module', 'alpha');
81 
82  $facture = new FactureFournisseur($db);
83  $facture->initAsSpecimen();
84  $facture->thirdparty = $specimenthirdparty; // Define who should has build the invoice (so the supplier)
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  {
91  $file = dol_buildpath($reldir."core/modules/supplier_invoice/doc/pdf_".$modele.".modules.php", 0);
92  if (file_exists($file))
93  {
94  $filefound = 1;
95  $classname = "pdf_".$modele;
96  break;
97  }
98  }
99 
100  if ($filefound)
101  {
102  require_once $file;
103 
104  $module = new $classname($db, $facture);
105 
106  if ($module->write_file($facture, $langs) > 0)
107  {
108  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf");
109  return;
110  } else {
111  setEventMessages($module->error, $module->errors, 'errors');
112  dol_syslog($module->error, LOG_ERR);
113  }
114  } else {
115  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
116  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
117  }
118 }
119 
120 // Activate a model
121 elseif ($action == 'set')
122 {
123  $ret = addDocumentModel($value, $type, $label, $scandir);
124 } elseif ($action == 'del')
125 {
126  $ret = delDocumentModel($value, $type);
127  if ($ret > 0)
128  {
129  if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$value") dolibarr_del_const($db, 'INVOICE_SUPPLIER_ADDON_PDF', $conf->entity);
130  }
131 }
132 
133 // Set default model
134 elseif ($action == 'setdoc')
135 {
136  if (dolibarr_set_const($db, "INVOICE_SUPPLIER_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->INVOICE_SUPPLIER_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 } elseif ($action == 'unsetdoc') {
150  dolibarr_del_const($db, "INVOICE_SUPPLIER_ADDON_PDF", $conf->entity);
151 }
152 
153 if ($action == 'setmod')
154 {
155  // TODO Verifier si module numerotation choisi peut etre active
156  // par appel methode canBeActivated
157 
158  dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity);
159 }
160 
161 if ($action == 'addcat')
162 {
163  $fourn = new Fournisseur($db);
164  $fourn->CreateCategory($user, GETPOST('cat', 'alphanohtml'));
165 }
166 
167 if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT')
168 {
169  $freetext = GETPOST('SUPPLIER_INVOICE_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
170 
171  $res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
172 
173  if (!($res > 0)) $error++;
174 
175  if (!$error)
176  {
177  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
178  } else {
179  setEventMessages($langs->trans("Error"), null, 'errors');
180  }
181 }
182 
183 
184 /*
185  * View
186  */
187 
188 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
189 
190 llxHeader("", "");
191 
192 $form = new Form($db);
193 
194 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
195 print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
196 
197 print "<br>";
198 
200 
201 print dol_get_fiche_head($head, 'invoice', $langs->trans("Suppliers"), -1, 'company');
202 
203 
204 // Supplier invoice numbering module
205 
206 print load_fiche_titre($langs->trans("SuppliersInvoiceNumberingModel"), '', '');
207 
208 print '<table class="noborder centpercent">';
209 print '<tr class="liste_titre">';
210 print '<td width="100">'.$langs->trans("Name").'</td>';
211 print '<td>'.$langs->trans("Description").'</td>';
212 print '<td>'.$langs->trans("Example").'</td>';
213 print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
214 print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
215 print "</tr>\n";
216 
217 clearstatcache();
218 
219 foreach ($dirmodels as $reldir)
220 {
221  $dir = dol_buildpath($reldir."core/modules/supplier_invoice");
222 
223  if (is_dir($dir))
224  {
225  $handle = opendir($dir);
226  if (is_resource($handle))
227  {
228  while (($file = readdir($handle)) !== false)
229  {
230  if (substr($file, 0, 24) == 'mod_facture_fournisseur_' && substr($file, dol_strlen($file) - 3, 3) == 'php')
231  {
232  $file = substr($file, 0, dol_strlen($file) - 4);
233 
234  require_once $dir.'/'.$file.'.php';
235 
236  $module = new $file;
237 
238  if ($module->isEnabled())
239  {
240  // Show modules according to features level
241  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
242  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
243 
244 
245  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
246  print $module->info();
247  print '</td>';
248 
249  // Show example of numbering model
250  print '<td class="nowrap">';
251  $tmp = $module->getExample();
252  if (preg_match('/^Error/', $tmp)) {
253  $langs->load("errors");
254  print '<div class="error">'.$langs->trans($tmp).'</div>';
255  } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp);
256  else print $tmp;
257  print '</td>'."\n";
258 
259  print '<td class="center">';
260  if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file")
261  {
262  print img_picto($langs->trans("Activated"), 'switch_on');
263  } else {
264  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;token='.newToken().'&amp;value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
265  }
266  print '</td>';
267 
268  $invoice = new FactureFournisseur($db);
269  $invoice->initAsSpecimen();
270 
271  // Info
272  $htmltooltip = '';
273  $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
274  $nextval = $module->getNextValue($mysoc, $invoice);
275  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
276  $htmltooltip .= ''.$langs->trans("NextValue").': ';
277  if ($nextval) {
278  if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured')
279  $nextval = $langs->trans($nextval);
280  $htmltooltip .= $nextval.'<br>';
281  } else {
282  $htmltooltip .= $langs->trans($module->error).'<br>';
283  }
284  }
285 
286  print '<td class="center">';
287  print $form->textwithpicto('', $htmltooltip, 1, 0);
288  print '</td>';
289 
290  print '</tr>';
291  }
292  }
293  }
294  closedir($handle);
295  }
296  }
297 }
298 
299 print '</table><br>';
300 
301 
302 
303 
304 /*
305  * Modeles documents for supplier invoices
306  */
307 
308 print load_fiche_titre($langs->trans("BillsPDFModules"), '', '');
309 
310 // Defini tableau def de modele
311 $def = array();
312 
313 $sql = "SELECT nom";
314 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
315 $sql .= " WHERE type = 'invoice_supplier'";
316 $sql .= " AND entity = ".$conf->entity;
317 
318 $resql = $db->query($sql);
319 if ($resql)
320 {
321  $i = 0;
322  $num_rows = $db->num_rows($resql);
323  while ($i < $num_rows)
324  {
325  $array = $db->fetch_array($resql);
326  array_push($def, $array[0]);
327  $i++;
328  }
329 } else {
330  dol_print_error($db);
331 }
332 
333 print '<table class="noborder centpercent">'."\n";
334 print '<tr class="liste_titre">'."\n";
335 print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
336 print '<td>'.$langs->trans("Description").'</td>'."\n";
337 print '<td align="center" width="60">'.$langs->trans("Status").'</td>'."\n";
338 print '<td align="center" width="60">'.$langs->trans("Default").'</td>'."\n";
339 print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
340 print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
341 print '</tr>'."\n";
342 
343 clearstatcache();
344 
345 foreach ($dirmodels as $reldir)
346 {
347  $realpath = $reldir."core/modules/supplier_invoice/doc";
348  $dir = dol_buildpath($realpath);
349 
350  if (is_dir($dir))
351  {
352  $handle = opendir($dir);
353 
354 
355  if (is_resource($handle))
356  {
357  while (($file = readdir($handle)) !== false)
358  {
359  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file))
360  {
361  $name = substr($file, 4, dol_strlen($file) - 16);
362  $classname = substr($file, 0, dol_strlen($file) - 12);
363 
364  require_once $dir.'/'.$file;
365  $module = new $classname($db, new FactureFournisseur($db));
366 
367 
368  print "<tr class=\"oddeven\">\n";
369  print "<td>";
370  print (empty($module->name) ? $name : $module->name);
371  print "</td>\n";
372  print "<td>\n";
373  require_once $dir.'/'.$file;
374  $module = new $classname($db, $specimenthirdparty);
375  if (method_exists($module, 'info')) print $module->info($langs);
376  else print $module->description;
377 
378  print "</td>\n";
379 
380  // Active
381  if (in_array($name, $def))
382  {
383  print '<td class="center">'."\n";
384  //if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
385  //{
386  // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
387  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=invoice_supplier">';
388  print img_picto($langs->trans("Enabled"), 'switch_on');
389  print '</a>';
390  /*}
391  else
392  {
393  print img_picto($langs->trans("Enabled"),'switch_on');
394  }*/
395  print "</td>";
396  } else {
397  print '<td class="center">'."\n";
398  print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
399  print "</td>";
400  }
401 
402  // Default
403  print '<td class="center">';
404  if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name")
405  {
406  //print img_picto($langs->trans("Default"),'on');
407  // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
408  print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
409  } else {
410  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
411  }
412  print '</td>';
413 
414  // Info
415  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
416  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
417  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
418  $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
419 
420  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
421  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
422  $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
423  $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
424  print '<td class="center">';
425  print $form->textwithpicto('', $htmltooltip, 1, 0);
426  print '</td>';
427  print '<td class="center">';
428  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
429  print '</td>';
430 
431  print "</tr>\n";
432  }
433  }
434 
435  closedir($handle);
436  }
437  }
438 }
439 
440 print '</table><br>';
441 
442 /*
443  * Other options
444  */
445 
446 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
447 print '<input type="hidden" name="token" value="'.newToken().'">';
448 print '<input type="hidden" name="action" value="set_SUPPLIER_INVOICE_FREE_TEXT">';
449 
450 print load_fiche_titre($langs->trans("OtherOptions"), '', '');
451 print '<table class="noborder centpercent">';
452 print '<tr class="liste_titre">';
453 print '<td>'.$langs->trans("Parameter").'</td>';
454 print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
455 print '<td width="80">&nbsp;</td>';
456 print "</tr>\n";
457 
458 $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
459 $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
460 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
461 foreach ($substitutionarray as $key => $val) $htmltext .= $key.'<br>';
462 $htmltext .= '</i>';
463 
464 print '<tr class="oddeven"><td colspan="2">';
465 print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
466 $variablename = 'SUPPLIER_INVOICE_FREE_TEXT';
467 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
468 {
469  print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
470 } else {
471  include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
472  $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
473  print $doleditor->Create();
474 }
475 print '</td><td class="right">';
476 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
477 print "</td></tr>\n";
478 
479 print '</table><br>';
480 
481 print '</form>';
482 
483 
484 /*
485  * Notifications
486  */
487 
488 print load_fiche_titre($langs->trans("Notifications"), '', '');
489 print '<table class="noborder centpercent">';
490 print '<tr class="liste_titre">';
491 print '<td>'.$langs->trans("Parameter").'</td>';
492 print '<td align="center" width="60"></td>';
493 print '<td width="80">&nbsp;</td>';
494 print "</tr>\n";
495 
496 print '<tr class="oddeven"><td colspan="2">';
497 print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
498 print '</td><td class="right">';
499 print "</td></tr>\n";
500 
501 print '</table>';
502 
503 // End of page
504 llxFooter();
505 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1748
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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:575
addDocumentModel($name, $type, $label= '', $description= '')
Add document model used by doc generator.
Definition: admin.lib.php:1717
Class to manage suppliers invoices.
supplierorder_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: fourn.lib.php:202
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Class to manage suppliers.
llxHeader()
Empty header.
Definition: wrapper.php:45
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage generation of HTML components Only common components must be here.
Class to manage third parties objects (customers, suppliers, prospects...)
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
dolibarr_del_const($db, $name, $entity=1)
Effacement d&#39;une constante dans la base de donnees.
Definition: admin.lib.php:499
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it&#39;s its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
Definition: notice.php:44
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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 ...
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:643
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
Definition: index.php:89
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->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)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1232
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name &#39;newtoken&#39;.
print $_SERVER["PHP_SELF"] n
Edit parameters.
Definition: categories.php:101
Class to manage a WYSIWYG editor.
llxFooter()
Empty footer.
Definition: wrapper.php:59
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.