dolibarr 23.0.3
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-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
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
172$reg = array();
173if ($action == 'set') {
174 $ret = addDocumentModel($value, $type, $label, $scandir);
175} elseif ($action == 'del') {
176 $ret = delDocumentModel($value, $type);
177 if ($ret > 0) {
178 if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF') == "$value") {
179 dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF', $conf->entity);
180 }
181 }
182} elseif ($action == 'setdoc') {
183 dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF", empty($value) ? '' : $value, 'chaine', 0, '', $conf->entity);
184
185 // On active le modele
186 $ret = delDocumentModel($value, $type);
187 if ($ret > 0) {
188 $ret = addDocumentModel($value, $type, $label, $scandir);
189 }
190} elseif ($action == 'setmod') {
191 // TODO Verify if the chosen numbering module can be activated
192 // by calling method canBeActivated
193
194 dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON", $value, 'chaine', 0, '', $conf->entity);
195} elseif (preg_match('/set_(.*)/', $action, $reg)) {
196 $code = $reg[1];
197 if ($code == "SUPPLIER_PROPOSAL_FREE_TEXT") {
198 $value = (GETPOST($code, 'restricthtml') ? GETPOST($code, 'restricthtml') : 1);
199 } else {
200 $value = (GETPOST($code) ? GETPOST($code) : 1);
201 }
202 $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
203 if (!($res > 0)) {
204 $error++;
205 }
206
207 if ($error) {
208 setEventMessages($langs->trans('Error'), null, 'errors');
209 } else {
210 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
211 header("Location: " . $_SERVER["PHP_SELF"]);
212 exit();
213 }
214} elseif (preg_match('/del_(.*)/', $action, $reg)) {
215 $code = $reg[1];
216 $res = dolibarr_del_const($db, $code, $conf->entity);
217
218 if (!($res > 0)) {
219 $error++;
220 }
221
222 if ($error) {
223 setEventMessages($langs->trans('Error'), null, 'errors');
224 } else {
225 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
226 header("Location: " . $_SERVER["PHP_SELF"]);
227 exit();
228 }
229}
230
231
232/*
233 * Affiche page
234 */
235
236$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
237
238
239llxHeader('', $langs->trans("SupplierProposalSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplier_proposal');
240
241$form = new Form($db);
242
243$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>';
244
245print load_fiche_titre($langs->trans("SupplierProposalSetup"), $linkback, 'title_setup');
246
248
249print dol_get_fiche_head($head, 'general', $langs->trans("CommRequests"), -1, 'supplier_proposal');
250
251/*
252 * Module numerotation
253 */
254print load_fiche_titre($langs->trans("SupplierProposalNumberingModules"), '', '');
255
256print '<table class="noborder centpercent">';
257print '<tr class="liste_titre">';
258print '<td>'.$langs->trans("Name")."</td>\n";
259print '<td>'.$langs->trans("Description")."</td>\n";
260print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
261print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
262print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
263print '</tr>'."\n";
264
265clearstatcache();
266foreach ($dirmodels as $reldir) {
267 $dir = dol_buildpath($reldir."core/modules/supplier_proposal");
268
269 if (is_dir($dir)) {
270 $handle = opendir($dir);
271 if (is_resource($handle)) {
272 while (($file = readdir($handle)) !== false) {
273 if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
274 $file = substr($file, 0, dol_strlen($file) - 4);
275
276 require_once $dir.'/'.$file.'.php';
277
278 $module = new $file();
279 '@phan-var-force ModeleNumRefSupplierProposal $module';
280
281 // Show modules according to features level
282 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
283 continue;
284 }
285 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
286 continue;
287 }
288
289 if ($module->isEnabled()) {
290 print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
291 print $module->info($langs);
292 print '</td>';
293
294 // Show example of numbering module
295 print '<td class="nowrap">';
296 $tmp = $module->getExample();
297 if (preg_match('/^Error/', $tmp)) {
298 $langs->load("errors");
299 print '<div class="error">'.$langs->trans($tmp).'</div>';
300 } elseif ($tmp == 'NotConfigured') {
301 print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
302 } else {
303 print $tmp;
304 }
305 print '</td>'."\n";
306
307 print '<td class="center">';
308 if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') == "$file") {
309 print img_picto($langs->trans("Activated"), 'switch_on');
310 } else {
311 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
312 print img_picto($langs->trans("Disabled"), 'switch_off');
313 print '</a>';
314 }
315 print '</td>';
316
317 $supplier_proposal = new SupplierProposal($db);
318 $supplier_proposal->initAsSpecimen();
319
320 // Info
321 $htmltooltip = '';
322 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
323 $nextval = $module->getNextValue($mysoc, $supplier_proposal);
324 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
325 $htmltooltip .= ''.$langs->trans("NextValue").': ';
326 if ($nextval) {
327 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
328 $nextval = $langs->trans($nextval);
329 }
330 $htmltooltip .= $nextval.'<br>';
331 } else {
332 $htmltooltip .= $langs->trans($module->error).'<br>';
333 }
334 }
335
336 print '<td class="center">';
337 print $form->textwithpicto('', $htmltooltip, 1, 'info');
338 print '</td>';
339
340 print "</tr>\n";
341 }
342 }
343 }
344 closedir($handle);
345 }
346 }
347}
348print "</table><br>\n";
349
350
351/*
352 * Document templates generators
353 */
354
355print load_fiche_titre($langs->trans("SupplierProposalPDFModules"), '', '');
356
357// Load array def with activated templates
358$def = array();
359$sql = "SELECT nom";
360$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
361$sql .= " WHERE type = '".$db->escape($type)."'";
362$sql .= " AND entity = ".((int) $conf->entity);
363$resql = $db->query($sql);
364if ($resql) {
365 $i = 0;
366 $num_rows = $db->num_rows($resql);
367 while ($i < $num_rows) {
368 $array = $db->fetch_array($resql);
369 if (is_array($array)) {
370 array_push($def, $array[0]);
371 }
372 $i++;
373 }
374} else {
375 dol_print_error($db);
376}
377
378
379print "<table class=\"noborder\" width=\"100%\">\n";
380print "<tr class=\"liste_titre\">\n";
381print " <td>".$langs->trans("Name")."</td>\n";
382print " <td>".$langs->trans("Description")."</td>\n";
383print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
384print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
385print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
386print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
387print "</tr>\n";
388
389clearstatcache();
390
391foreach ($dirmodels as $reldir) {
392 foreach (array('', '/doc') as $valdir) {
393 $realpath = $reldir."core/modules/supplier_proposal".$valdir;
394 $dir = dol_buildpath($realpath);
395
396 if (is_dir($dir)) {
397 $handle = opendir($dir);
398 if (is_resource($handle)) {
399 $filelist = array();
400 while (($file = readdir($handle)) !== false) {
401 $filelist[] = $file;
402 }
403 closedir($handle);
404 arsort($filelist);
405
406 foreach ($filelist as $file) {
407 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
408 if (file_exists($dir.'/'.$file)) {
409 $name = substr($file, 4, dol_strlen($file) - 16);
410 $classname = substr($file, 0, dol_strlen($file) - 12);
411
412 require_once $dir.'/'.$file;
413 $module = new $classname($db);
414 '@phan-var-force CommonDocGenerator $module';
415
416 $modulequalified = 1;
417 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
418 $modulequalified = 0;
419 }
420 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
421 $modulequalified = 0;
422 }
423
424 if ($modulequalified) {
425 print '<tr class="oddeven"><td width="100">';
426 print(empty($module->name) ? $name : $module->name);
427 print "</td><td>\n";
428 if (method_exists($module, 'info')) {
429 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
430 } else {
431 print $module->description;
432 }
433 print '</td>';
434
435 // Active
436 if (in_array($name, $def)) {
437 print '<td class="center">'."\n";
438 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
439 print img_picto($langs->trans("Enabled"), 'switch_on');
440 print '</a>';
441 print '</td>';
442 } else {
443 print '<td align="center">'."\n";
444 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>';
445 print "</td>";
446 }
447
448 // Default
449 print '<td align="center">';
450 if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF') == "$name") {
451 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>';
452 } else {
453 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>';
454 }
455 print '</td>';
456
457 // Info
458 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
459 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
460 if ($module->type == 'pdf') {
461 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
462 }
463 $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
464
465 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
466 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
467 $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
468 $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
469 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
470 //$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
471 //$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
472 $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1);
473
474
475 print '<td class="center">';
476 print $form->textwithpicto('', $htmltooltip, 1, 'info');
477 print '</td>';
478
479 // Preview
480 print '<td class="center">';
481 if ($module->type == 'pdf') {
482 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
483 } else {
484 print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
485 }
486 print '</td>';
487
488 print "</tr>\n";
489 }
490 }
491 }
492 }
493 }
494 }
495 }
496}
497
498print '</table>';
499print '<br>';
500
501
502/*
503 * Other options
504 *
505 */
506print load_fiche_titre($langs->trans("OtherOptions"), '', '');
507
508print "<table class=\"noborder\" width=\"100%\">";
509print "<tr class=\"liste_titre\">";
510print "<td>".$langs->trans("Parameter")."</td>\n";
511print '<td></td>'."\n";
512print "<td>&nbsp;</td>\n";
513print "</tr>";
514
515$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
516$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
517$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
518foreach ($substitutionarray as $key => $val) {
519 $htmltext .= $key.'<br>';
520}
521$htmltext .= '</i>';
522
523print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
524print '<input type="hidden" name="token" value="'.newToken().'">';
525print '<input type="hidden" name="action" value="set_SUPPLIER_PROPOSAL_FREE_TEXT">';
526print '<tr class="oddeven"><td colspan="2">';
527print $form->textwithpicto($langs->trans("FreeLegalTextOnSupplierProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
528$variablename = 'SUPPLIER_PROPOSAL_FREE_TEXT';
529if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
530 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
531} else {
532 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
533 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
534 print $doleditor->Create();
535}
536print '</td><td class="right">';
537print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
538print "</td></tr>\n";
539print '</form>';
540
541
542print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
543print '<input type="hidden" name="token" value="'.newToken().'">';
544print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK\">";
545print '<tr class="oddeven"><td>';
546print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
547print '</td><td>';
548print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SUPPLIER_PROPOSAL_DRAFT_WATERMARK')).'">';
549print '</td><td class="right">';
550print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
551print "</td></tr>\n";
552print '</form>';
553
554if (isModEnabled('bank')) {
555 print '<tr class="oddeven"><td>';
556 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>';
557 print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
558 print '</td>';
559 print '<td></td>';
560 print '</tr>';
561} else {
562 print '<tr class="oddeven"><td>';
563 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
564}
565
566// Allow external download
567print '<tr class="oddeven">';
568print '<td>'.$langs->trans("AllowExternalDownload").'</td>';
569print '<td>';
570print ajax_constantonoff('PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1);
571print '</td>';
572print '<td></td>';
573print '</tr>';
574
575// Notifications
576print '<tr class="oddeven">';
577print '<td>'.img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("Notifications").'</td>';
578print '<td colspan="2">';
579print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification");
580print '</td></tr>';
581
582// More PDF options
583print '<tr class="oddeven">';
584print '<td>'.img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("MoreOptionsRelatedToPDF").'</td>';
585print '<td colspan="2">';
586print img_picto('', 'url', 'class="pictofixedwidth"').'<a href="'.DOL_URL_ROOT.'/admin/pdf_other.php">'.$langs->trans("SeeInPDFSetupPage").'</a>';
587print '</td></tr>';
588
589
590print '</table>';
591
592
593
594// End of page
595llxFooter();
596$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
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.
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...
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:824
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:128
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.