dolibarr 21.0.0-beta
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 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
12 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <https://www.gnu.org/licenses/>.
26 */
27
28// Load Dolibarr environment
29require '../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
33require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php';
34
44// Load translation files required by the page
45$langs->loadLangs(array("admin", "errors", "other", "supplier_proposal"));
46
47if (!$user->admin) {
49}
50
51$action = GETPOST('action', 'aZ09');
52$value = GETPOST('value', 'alpha');
53$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
54
55$label = GETPOST('label', 'alpha');
56$scandir = GETPOST('scan_dir', 'alpha');
57$type = 'supplier_proposal';
58
59$error = 0;
60
61
62/*
63 * Actions
64 */
65
66include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
67
68if ($action == 'updateMask') {
69 $maskconstsupplier_proposal = GETPOST('maskconstsupplier_proposal', 'aZ09');
70 $masksupplier_proposal = GETPOST('masksupplier_proposal', 'alpha');
71
72 $res = 0;
73
74 if ($maskconstsupplier_proposal && preg_match('/_MASK$/', $maskconstsupplier_proposal)) {
75 $res = dolibarr_set_const($db, $maskconstsupplier_proposal, $masksupplier_proposal, 'chaine', 0, '', $conf->entity);
76 }
77
78 if (!($res > 0)) {
79 $error++;
80 }
81
82 if (!$error) {
83 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
84 } else {
85 setEventMessages($langs->trans("Error"), null, 'errors');
86 }
87}
88
89if ($action == 'specimen') {
90 $modele = GETPOST('module', 'alpha');
91
92 $supplier_proposal = new SupplierProposal($db);
93 $supplier_proposal->initAsSpecimen();
94
95 // Search template files
96 $file = '';
97 $classname = '';
98 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
99 foreach ($dirmodels as $reldir) {
100 $file = dol_buildpath($reldir."core/modules/supplier_proposal/doc/pdf_".$modele.".modules.php");
101 if (file_exists($file)) {
102 $classname = "pdf_".$modele;
103 break;
104 }
105 }
106
107 if ($classname !== '') {
108 require_once $file;
109
110 $module = new $classname($db);
111 '@phan-var-force ModelePDFSupplierProposal $module';
112
113 if ($module->write_file($supplier_proposal, $langs) > 0) {
114 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf");
115 return;
116 } else {
117 setEventMessages($module->error, null, 'errors');
118 dol_syslog($module->error, LOG_ERR);
119 }
120 } else {
121 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
122 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
123 }
124}
125
126if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK') {
127 $draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK', 'alpha');
128
129 $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
130 if (!($res > 0)) {
131 $error++;
132 }
133
134 if (!$error) {
135 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
136 } else {
137 setEventMessages($langs->trans("Error"), null, 'errors');
138 }
139}
140
141if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') {
142 $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
143
144 $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
145
146 if (!($res > 0)) {
147 $error++;
148 }
149
150 if (!$error) {
151 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
152 } else {
153 setEventMessages($langs->trans("Error"), null, 'errors');
154 }
155}
156
157if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') {
158 $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
159
160 if (!($res > 0)) {
161 $error++;
162 }
163
164 if (!$error) {
165 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
166 } else {
167 setEventMessages($langs->trans("Error"), null, 'errors');
168 }
169}
170
171// Activate a model
172if ($action == 'set') {
173 $ret = addDocumentModel($value, $type, $label, $scandir);
174} elseif ($action == 'del') {
175 $ret = delDocumentModel($value, $type);
176 if ($ret > 0) {
177 if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") {
178 dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF', $conf->entity);
179 }
180 }
181} elseif ($action == 'setdoc') {
182 if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
183 $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF = $value;
184 }
185
186 // On active le modele
187 $ret = delDocumentModel($value, $type);
188 if ($ret > 0) {
189 $ret = addDocumentModel($value, $type, $label, $scandir);
190 }
191} elseif ($action == 'setmod') {
192 // TODO Verify if the chosen numbering module can be activated
193 // by calling method canBeActivated
194
195 dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON", $value, 'chaine', 0, '', $conf->entity);
196} elseif (preg_match('/set_(.*)/', $action, $reg)) {
197 $code = $reg[1];
198 $value = (GETPOST($code) ? GETPOST($code) : 1);
199
200 $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
201 if (!($res > 0)) {
202 $error++;
203 }
204
205 if ($error) {
206 setEventMessages($langs->trans('Error'), null, 'errors');
207 } else {
208 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
209 header("Location: " . $_SERVER["PHP_SELF"]);
210 exit();
211 }
212} elseif (preg_match('/del_(.*)/', $action, $reg)) {
213 $code = $reg[1];
214 $res = dolibarr_del_const($db, $code, $conf->entity);
215
216 if (!($res > 0)) {
217 $error++;
218 }
219
220 if ($error) {
221 setEventMessages($langs->trans('Error'), null, 'errors');
222 } else {
223 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
224 header("Location: " . $_SERVER["PHP_SELF"]);
225 exit();
226 }
227}
228
229
230/*
231 * Affiche page
232 */
233
234$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
235
236
237llxHeader('', $langs->trans("SupplierProposalSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplier_proposal');
238
239$form = new Form($db);
240
241//if ($mesg) print $mesg;
242
243$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
244print load_fiche_titre($langs->trans("SupplierProposalSetup"), $linkback, 'title_setup');
245
247
248print dol_get_fiche_head($head, 'general', $langs->trans("CommRequests"), -1, 'supplier_proposal');
249
250/*
251 * Module numerotation
252 */
253print load_fiche_titre($langs->trans("SupplierProposalNumberingModules"), '', '');
254
255print '<table class="noborder centpercent">';
256print '<tr class="liste_titre">';
257print '<td>'.$langs->trans("Name")."</td>\n";
258print '<td>'.$langs->trans("Description")."</td>\n";
259print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
260print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
261print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
262print '</tr>'."\n";
263
264clearstatcache();
265foreach ($dirmodels as $reldir) {
266 $dir = dol_buildpath($reldir."core/modules/supplier_proposal");
267
268 if (is_dir($dir)) {
269 $handle = opendir($dir);
270 if (is_resource($handle)) {
271 while (($file = readdir($handle)) !== false) {
272 if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
273 $file = substr($file, 0, dol_strlen($file) - 4);
274
275 require_once $dir.'/'.$file.'.php';
276
277 $module = new $file();
278 '@phan-var-force ModeleNumRefSupplierProposal $module';
279
280 // Show modules according to features level
281 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
282 continue;
283 }
284 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
285 continue;
286 }
287
288 if ($module->isEnabled()) {
289 print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
290 print $module->info($langs);
291 print '</td>';
292
293 // Show example of numbering module
294 print '<td class="nowrap">';
295 $tmp = $module->getExample();
296 if (preg_match('/^Error/', $tmp)) {
297 $langs->load("errors");
298 print '<div class="error">'.$langs->trans($tmp).'</div>';
299 } elseif ($tmp == 'NotConfigured') {
300 print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
301 } else {
302 print $tmp;
303 }
304 print '</td>'."\n";
305
306 print '<td class="center">';
307 if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") {
308 print img_picto($langs->trans("Activated"), 'switch_on');
309 } else {
310 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
311 print img_picto($langs->trans("Disabled"), 'switch_off');
312 print '</a>';
313 }
314 print '</td>';
315
316 $supplier_proposal = new SupplierProposal($db);
317 $supplier_proposal->initAsSpecimen();
318
319 // Info
320 $htmltooltip = '';
321 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
322 $nextval = $module->getNextValue($mysoc, $supplier_proposal);
323 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
324 $htmltooltip .= ''.$langs->trans("NextValue").': ';
325 if ($nextval) {
326 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
327 $nextval = $langs->trans($nextval);
328 }
329 $htmltooltip .= $nextval.'<br>';
330 } else {
331 $htmltooltip .= $langs->trans($module->error).'<br>';
332 }
333 }
334
335 print '<td class="center">';
336 print $form->textwithpicto('', $htmltooltip, 1, 0);
337 print '</td>';
338
339 print "</tr>\n";
340 }
341 }
342 }
343 closedir($handle);
344 }
345 }
346}
347print "</table><br>\n";
348
349
350/*
351 * Document templates generators
352 */
353
354print load_fiche_titre($langs->trans("SupplierProposalPDFModules"), '', '');
355
356// Load array def with activated templates
357$def = array();
358$sql = "SELECT nom";
359$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
360$sql .= " WHERE type = '".$db->escape($type)."'";
361$sql .= " AND entity = ".$conf->entity;
362$resql = $db->query($sql);
363if ($resql) {
364 $i = 0;
365 $num_rows = $db->num_rows($resql);
366 while ($i < $num_rows) {
367 $array = $db->fetch_array($resql);
368 if (is_array($array)) {
369 array_push($def, $array[0]);
370 }
371 $i++;
372 }
373} else {
374 dol_print_error($db);
375}
376
377
378print "<table class=\"noborder\" width=\"100%\">\n";
379print "<tr class=\"liste_titre\">\n";
380print " <td>".$langs->trans("Name")."</td>\n";
381print " <td>".$langs->trans("Description")."</td>\n";
382print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
383print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
384print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
385print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
386print "</tr>\n";
387
388clearstatcache();
389
390foreach ($dirmodels as $reldir) {
391 foreach (array('', '/doc') as $valdir) {
392 $realpath = $reldir."core/modules/supplier_proposal".$valdir;
393 $dir = dol_buildpath($realpath);
394
395 if (is_dir($dir)) {
396 $handle = opendir($dir);
397 if (is_resource($handle)) {
398 $filelist = array();
399 while (($file = readdir($handle)) !== false) {
400 $filelist[] = $file;
401 }
402 closedir($handle);
403 arsort($filelist);
404
405 foreach ($filelist as $file) {
406 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
407 if (file_exists($dir.'/'.$file)) {
408 $name = substr($file, 4, dol_strlen($file) - 16);
409 $classname = substr($file, 0, dol_strlen($file) - 12);
410
411 require_once $dir.'/'.$file;
412 $module = new $classname($db);
413 '@phan-var-force CommonDocGenerator $module';
414
415 $modulequalified = 1;
416 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
417 $modulequalified = 0;
418 }
419 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
420 $modulequalified = 0;
421 }
422
423 if ($modulequalified) {
424 print '<tr class="oddeven"><td width="100">';
425 print(empty($module->name) ? $name : $module->name);
426 print "</td><td>\n";
427 if (method_exists($module, 'info')) {
428 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
429 } else {
430 print $module->description;
431 }
432 print '</td>';
433
434 // Active
435 if (in_array($name, $def)) {
436 print '<td class="center">'."\n";
437 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
438 print img_picto($langs->trans("Enabled"), 'switch_on');
439 print '</a>';
440 print '</td>';
441 } else {
442 print '<td align="center">'."\n";
443 print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
444 print "</td>";
445 }
446
447 // Default
448 print '<td align="center">';
449 if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") {
450 print img_picto($langs->trans("Default"), 'on');
451 } else {
452 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
453 }
454 print '</td>';
455
456 // Info
457 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
458 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
459 if ($module->type == 'pdf') {
460 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
461 }
462 $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
463
464 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
465 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
466 $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
467 $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
468 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
469 //$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
470 //$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
471 $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1);
472
473
474 print '<td class="center">';
475 print $form->textwithpicto('', $htmltooltip, 1, 0);
476 print '</td>';
477
478 // Preview
479 print '<td class="center">';
480 if ($module->type == 'pdf') {
481 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
482 } else {
483 print img_object($langs->trans("PreviewNotAvailable"), 'generic');
484 }
485 print '</td>';
486
487 print "</tr>\n";
488 }
489 }
490 }
491 }
492 }
493 }
494 }
495}
496
497print '</table>';
498print '<br>';
499
500
501/*
502 * Other options
503 *
504 */
505print load_fiche_titre($langs->trans("OtherOptions"), '', '');
506
507print "<table class=\"noborder\" width=\"100%\">";
508print "<tr class=\"liste_titre\">";
509print "<td>".$langs->trans("Parameter")."</td>\n";
510print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
511print "<td>&nbsp;</td>\n";
512print "</tr>";
513
514$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
515$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
516$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
517foreach ($substitutionarray as $key => $val) {
518 $htmltext .= $key.'<br>';
519}
520$htmltext .= '</i>';
521
522print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
523print '<input type="hidden" name="token" value="'.newToken().'">';
524print '<input type="hidden" name="action" value="set_SUPPLIER_PROPOSAL_FREE_TEXT">';
525print '<tr class="oddeven"><td colspan="2">';
526print $form->textwithpicto($langs->trans("FreeLegalTextOnSupplierProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
527$variablename = 'SUPPLIER_PROPOSAL_FREE_TEXT';
528if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
529 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
530} else {
531 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
532 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
533 print $doleditor->Create();
534}
535print '</td><td class="right">';
536print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
537print "</td></tr>\n";
538print '</form>';
539
540
541print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
542print '<input type="hidden" name="token" value="'.newToken().'">';
543print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK\">";
544print '<tr class="oddeven"><td>';
545print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
546print '</td><td>';
547print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SUPPLIER_PROPOSAL_DRAFT_WATERMARK')).'">';
548print '</td><td class="right">';
549print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
550print "</td></tr>\n";
551print '</form>';
552
553if (isModEnabled('bank')) {
554 print '<tr class="oddeven"><td>';
555 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td class="right">';
556 print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
557 print '</td></tr>';
558} else {
559 print '<tr class="oddeven"><td>';
560 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
561}
562
563// Allow external download
564print '<tr class="oddeven">';
565print '<td>'.$langs->trans("AllowExternalDownload").'</td><td>&nbsp;</td>';
566print '<td class="right">';
567print ajax_constantonoff('PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1);
568print '</td></tr>';
569
570print '</table>';
571
572
573
574/*
575 * Directory
576 */
577print '<br>';
578print load_fiche_titre($langs->trans("PathToDocuments"), '', '');
579
580print "<table class=\"noborder\" width=\"100%\">\n";
581print "<tr class=\"liste_titre\">\n";
582print " <td>".$langs->trans("Name")."</td>\n";
583print " <td>".$langs->trans("Value")."</td>\n";
584print "</tr>\n";
585print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->supplier_proposal->dir_output."</td>\n</tr>\n";
586print "</table>\n<br>";
587
588// End of page
589llxFooter();
590$db->close();
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
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).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
Class to manage a WYSIWYG editor.
Class to manage generation of HTML components Only common components must be here.
Class to manage price ask supplier.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0, $include=null)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition pdf.lib.php:765
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
supplier_proposal_admin_prepare_head()
Return array head with list of tabs to view object information.