dolibarr  9.0.0
supplier_proposal.php
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) 2004 Eric Seigne <eric.seigne@ryxeo.com>
7  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
8  * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
9  * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
10  * Copyright (C) 2015 Jean-Fran├žois Ferry <jfefe@aternatik.fr>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 require '../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
29 require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php';
31 
32 // Load translation files required by the page
33 $langs->loadLangs(array("admin", "errors", "other", "supplier_proposal"));
34 
35 if (! $user->admin) accessforbidden();
36 
37 $action = GETPOST('action','alpha');
38 $value = GETPOST('value','alpha');
39 $label = GETPOST('label','alpha');
40 $scandir = GETPOST('scan_dir','alpha');
41 $type='supplier_proposal';
42 
43 $error=0;
44 
45 
46 /*
47  * Actions
48  */
49 
50 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
51 
52 if ($action == 'updateMask')
53 {
54  $maskconstsupplier_proposal=GETPOST('maskconstsupplier_proposal','alpha');
55  $masksupplier_proposal=GETPOST('masksupplier_proposal','alpha');
56  if ($maskconstsupplier_proposal) $res = dolibarr_set_const($db,$maskconstsupplier_proposal,$masksupplier_proposal,'chaine',0,'',$conf->entity);
57 
58  if (! $res > 0) $error++;
59 
60  if (! $error)
61  {
62  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
63  }
64  else
65  {
66  setEventMessages($langs->trans("Error"), null, 'errors');
67  }
68 }
69 
70 if ($action == 'specimen')
71 {
72  $modele=GETPOST('module','alpha');
73 
74  $supplier_proposal = new SupplierProposal($db);
75  $supplier_proposal->initAsSpecimen();
76 
77  // Search template files
78  $file=''; $classname=''; $filefound=0;
79  $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
80  foreach($dirmodels as $reldir)
81  {
82  $file=dol_buildpath($reldir."core/modules/supplier_proposal/doc/pdf_".$modele.".modules.php");
83  if (file_exists($file))
84  {
85  $filefound=1;
86  $classname = "pdf_".$modele;
87  break;
88  }
89  }
90 
91  if ($filefound)
92  {
93  require_once $file;
94 
95  $module = new $classname($db);
96 
97  if ($module->write_file($supplier_proposal,$langs) > 0)
98  {
99  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf");
100  return;
101  }
102  else
103  {
104  setEventMessages($module->error, null, 'errors');
105  dol_syslog($module->error, LOG_ERR);
106  }
107  }
108  else
109  {
110  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
111  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
112  }
113 }
114 
115 if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK')
116 {
117  $draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK','alpha');
118 
119  $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
120  if (! $res > 0) $error++;
121 
122  if (! $error)
123  {
124  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
125  }
126  else
127  {
128  setEventMessages($langs->trans("Error"), null, 'errors');
129  }
130 }
131 
132 if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT')
133 {
134  $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT','none'); // No alpha here, we want exact string
135 
136  $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
137 
138  if (! $res > 0) $error++;
139 
140  if (! $error)
141  {
142  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
143  }
144  else
145  {
146  setEventMessages($langs->trans("Error"), null, 'errors');
147  }
148 }
149 
150 if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL')
151 {
152  $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL",$value,'chaine',0,'',$conf->entity);
153 
154  if (! $res > 0) $error++;
155 
156  if (! $error)
157  {
158  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
159  }
160  else
161  {
162  setEventMessages($langs->trans("Error"), null, 'errors');
163  }
164 }
165 
166 // Activate a model
167 if ($action == 'set')
168 {
169  $ret = addDocumentModel($value, $type, $label, $scandir);
170 }
171 
172 else if ($action == 'del')
173 {
174  $ret = delDocumentModel($value, $type);
175  if ($ret > 0)
176  {
177  if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF',$conf->entity);
178  }
179 }
180 
181 else if ($action == 'setdoc')
182 {
183  if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
184  {
185  $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF = $value;
186  }
187 
188  // On active le modele
189  $ret = delDocumentModel($value, $type);
190  if ($ret > 0)
191  {
192  $ret = addDocumentModel($value, $type, $label, $scandir);
193  }
194 }
195 
196 else if ($action == 'setmod')
197 {
198  // TODO Verifier si module numerotation choisi peut etre active
199  // par appel methode canBeActivated
200 
201  dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON",$value,'chaine',0,'',$conf->entity);
202 }
203 
204 
205 /*
206  * Affiche page
207  */
208 
209 $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
210 
211 
212 llxHeader('',$langs->trans("SupplierProposalSetup"));
213 
214 $form=new Form($db);
215 
216 //if ($mesg) print $mesg;
217 
218 $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
219 print load_fiche_titre($langs->trans("SupplierProposalSetup"),$linkback,'title_setup');
220 
221 $head = supplier_proposal_admin_prepare_head();
222 
223 dol_fiche_head($head, 'general', $langs->trans("CommRequests"), 0, 'supplier_proposal');
224 
225 /*
226  * Module numerotation
227  */
228 print load_fiche_titre($langs->trans("SupplierProposalNumberingModules"),'','');
229 
230 print '<table class="noborder" width="100%">';
231 print '<tr class="liste_titre">';
232 print '<td>'.$langs->trans("Name")."</td>\n";
233 print '<td>'.$langs->trans("Description")."</td>\n";
234 print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
235 print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
236 print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
237 print '</tr>'."\n";
238 
239 clearstatcache();
240 foreach ($dirmodels as $reldir)
241 {
242  $dir = dol_buildpath($reldir."core/modules/supplier_proposal/");
243 
244  if (is_dir($dir))
245  {
246  $handle = opendir($dir);
247  if (is_resource($handle))
248  {
249 
250  while (($file = readdir($handle))!==false)
251  {
252  if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file)-3, 3) == 'php')
253  {
254  $file = substr($file, 0, dol_strlen($file)-4);
255 
256  require_once $dir.$file.'.php';
257 
258  $module = new $file;
259 
260  // Show modules according to features level
261  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
262  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
263 
264  if ($module->isEnabled())
265  {
266 
267  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
268  print $module->info();
269  print '</td>';
270 
271  // Show example of numbering module
272  print '<td class="nowrap">';
273  $tmp=$module->getExample();
274  if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
275  elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
276  else print $tmp;
277  print '</td>'."\n";
278 
279  print '<td align="center">';
280  if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file")
281  {
282  print img_picto($langs->trans("Activated"),'switch_on');
283  }
284  else
285  {
286  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'">';
287  print img_picto($langs->trans("Disabled"),'switch_off');
288  print '</a>';
289  }
290  print '</td>';
291 
292  $supplier_proposal=new SupplierProposal($db);
293  $supplier_proposal->initAsSpecimen();
294 
295  // Info
296  $htmltooltip='';
297  $htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
298  $nextval=$module->getNextValue($mysoc,$supplier_proposal);
299  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
300  $htmltooltip.=''.$langs->trans("NextValue").': ';
301  if ($nextval) {
302  if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
303  $nextval = $langs->trans($nextval);
304  $htmltooltip.=$nextval.'<br>';
305  } else {
306  $htmltooltip.=$langs->trans($module->error).'<br>';
307  }
308  }
309 
310  print '<td align="center">';
311  print $form->textwithpicto('',$htmltooltip,1,0);
312  print '</td>';
313 
314  print "</tr>\n";
315  }
316  }
317  }
318  closedir($handle);
319  }
320  }
321 }
322 print "</table><br>\n";
323 
324 
325 /*
326  * Document templates generators
327  */
328 
329 print load_fiche_titre($langs->trans("SupplierProposalPDFModules"),'','');
330 
331 // Load array def with activated templates
332 $def = array();
333 $sql = "SELECT nom";
334 $sql.= " FROM ".MAIN_DB_PREFIX."document_model";
335 $sql.= " WHERE type = '".$type."'";
336 $sql.= " AND entity = ".$conf->entity;
337 $resql=$db->query($sql);
338 if ($resql)
339 {
340  $i = 0;
341  $num_rows=$db->num_rows($resql);
342  while ($i < $num_rows)
343  {
344  $array = $db->fetch_array($resql);
345  array_push($def, $array[0]);
346  $i++;
347  }
348 }
349 else
350 {
351  dol_print_error($db);
352 }
353 
354 
355 print "<table class=\"noborder\" width=\"100%\">\n";
356 print "<tr class=\"liste_titre\">\n";
357 print " <td>".$langs->trans("Name")."</td>\n";
358 print " <td>".$langs->trans("Description")."</td>\n";
359 print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
360 print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
361 print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
362 print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
363 print "</tr>\n";
364 
365 clearstatcache();
366 
367 foreach ($dirmodels as $reldir)
368 {
369  foreach (array('','/doc') as $valdir)
370  {
371  $dir = dol_buildpath($reldir."core/modules/supplier_proposal".$valdir);
372 
373  if (is_dir($dir))
374  {
375  $handle=opendir($dir);
376  if (is_resource($handle))
377  {
378  while (($file = readdir($handle))!==false)
379  {
380  $filelist[]=$file;
381  }
382  closedir($handle);
383  arsort($filelist);
384 
385  foreach($filelist as $file)
386  {
387  if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
388  {
389  if (file_exists($dir.'/'.$file))
390  {
391  $name = substr($file, 4, dol_strlen($file) -16);
392  $classname = substr($file, 0, dol_strlen($file) -12);
393 
394  require_once $dir.'/'.$file;
395  $module = new $classname($db);
396 
397  $modulequalified=1;
398  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
399  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
400 
401  if ($modulequalified)
402  {
403  print '<tr class="oddeven"><td width="100">';
404  print (empty($module->name)?$name:$module->name);
405  print "</td><td>\n";
406  if (method_exists($module,'info')) print $module->info($langs);
407  else print $module->description;
408  print '</td>';
409 
410  // Active
411  if (in_array($name, $def))
412  {
413  print '<td align="center">'."\n";
414  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
415  print img_picto($langs->trans("Enabled"),'switch_on');
416  print '</a>';
417  print '</td>';
418  }
419  else
420  {
421  print "<td align=\"center\">\n";
422  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>';
423  print "</td>";
424  }
425 
426  // Defaut
427  print "<td align=\"center\">";
428  if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name")
429  {
430  print img_picto($langs->trans("Default"),'on');
431  }
432  else
433  {
434  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>';
435  }
436  print '</td>';
437 
438  // Info
439  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
440  $htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
441  if ($module->type == 'pdf')
442  {
443  $htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
444  }
445  $htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
446  $htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
447  $htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
448  $htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
449  $htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
450  //$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
451  //$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
452  $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark,1,1);
453 
454 
455  print '<td align="center">';
456  print $form->textwithpicto('',$htmltooltip,1,0);
457  print '</td>';
458 
459  // Preview
460  print '<td align="center">';
461  if ($module->type == 'pdf')
462  {
463  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
464  }
465  else
466  {
467  print img_object($langs->trans("PreviewNotAvailable"),'generic');
468  }
469  print '</td>';
470 
471  print "</tr>\n";
472  }
473  }
474  }
475  }
476  }
477  }
478  }
479 }
480 
481 print '</table>';
482 print '<br>';
483 
484 
485 /*
486  * Other options
487  *
488  */
489 print load_fiche_titre($langs->trans("OtherOptions"),'','');
490 
491 print "<table class=\"noborder\" width=\"100%\">";
492 print "<tr class=\"liste_titre\">";
493 print "<td>".$langs->trans("Parameter")."</td>\n";
494 print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
495 print "<td>&nbsp;</td>\n";
496 print "</tr>";
497 
498 $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
499 $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
500 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
501 foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
502 $htmltext.='</i>';
503 
504 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
505 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
506 print '<input type="hidden" name="action" value="set_SUPPLIER_PROPOSAL_FREE_TEXT">';
507 print '<tr class="oddeven"><td colspan="2">';
508 print $form->textwithpicto($langs->trans("FreeLegalTextOnSupplierProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
509 $variablename='SUPPLIER_PROPOSAL_FREE_TEXT';
510 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
511 {
512  print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
513 }
514 else
515 {
516  include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
517  $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
518  print $doleditor->Create();
519 }
520 print '</td><td align="right">';
521 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
522 print "</td></tr>\n";
523 print '</form>';
524 
525 
526 print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
527 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
528 print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK\">";
529 print '<tr class="oddeven"><td>';
530 print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
531 print '</td><td>';
532 print '<input size="50" class="flat" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.$conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK.'">';
533 print '</td><td align="right">';
534 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
535 print "</td></tr>\n";
536 print '</form>';
537 
538 if ($conf->banque->enabled)
539 {
540 
541  print '<tr class="oddeven"><td>';
542  print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp</td><td align="right">';
543  if (! empty($conf->use_javascript_ajax))
544  {
545  print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
546  }
547  else
548  {
549  if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL))
550  {
551  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&amp;value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
552  }
553  else
554  {
555  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL&amp;value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
556  }
557  }
558  print '</td></tr>';
559 }
560 else
561 {
562 
563  print '<tr class="oddeven"><td>';
564  print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
565 }
566 
567 print '</table>';
568 
569 
570 
571 /*
572  * Directory
573  */
574 print '<br>';
575 print load_fiche_titre($langs->trans("PathToDocuments"),'','');
576 
577 print "<table class=\"noborder\" width=\"100%\">\n";
578 print "<tr class=\"liste_titre\">\n";
579 print " <td>".$langs->trans("Name")."</td>\n";
580 print " <td>".$langs->trans("Value")."</td>\n";
581 print "</tr>\n";
582 print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->supplier_proposal->dir_output."</td>\n</tr>\n";
583 print "</table>\n<br>";
584 
585 // End of page
586 llxFooter();
587 $db->close();
588 
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
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.
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
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0)
On/off button for constant.
Definition: ajax.lib.php:484
Class to manage price ask supplier.
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)