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