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