dolibarr 21.0.0-alpha
pdf_other.php
1<?php
2/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
6 * Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
7 * Copyright (C) 2021-2022 Anthony Berton <bertonanthony@gmail.com>
8 * Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
9 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
10 * Copyright (C) 2024 Nick Fragoulis
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 */
25
31// Load Dolibarr environment
32require '../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
36require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
37require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
38require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
39
40// Load translation files required by the page
41$langs->loadLangs(array('admin', 'bills', 'companies', 'languages', 'members', 'other', 'products', 'propal', 'receptions', 'stocks', 'trips', 'orders'));
42
43if (!$user->admin) {
45}
46
47$action = GETPOST('action', 'aZ09');
48
49
50/*
51 * Actions
52 */
53
54if ($action == 'update') {
55 if (GETPOSTISSET('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
56 dolibarr_set_const($db, "MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", GETPOST("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"), 'chaine', 0, '', $conf->entity);
57 }
58 if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
59 dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
60 }
61 if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
62 dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTMODE", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTMODE"), 'chaine', 0, '', $conf->entity);
63 }
64 if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
65 dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity);
66 }
67 if (GETPOSTISSET('SALES_ORDER_SHOW_SHIPPING_ADDRESS')) {
68 dolibarr_set_const($db, "SALES_ORDER_SHOW_SHIPPING_ADDRESS", GETPOSTINT("SALES_ORDER_SHOW_SHIPPING_ADDRESS"), 'chaine', 0, '', $conf->entity);
69 dolibarr_del_const($db, "SALES_ORDER_SHOW_SHIPPING_ADDRESS", $conf->entity);
70 }
71 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
72 dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", GETPOST("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"), 'chaine', 0, '', $conf->entity);
73 }
74 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
75 dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", GETPOST("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"), 'chaine', 0, '', $conf->entity);
76 }
77 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
78 dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", GETPOST("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"), 'chaine', 0, '', $conf->entity);
79 }
80 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
81 dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", GETPOST("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"), 'chaine', 0, '', $conf->entity);
82 }
83 if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
84 dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOSTINT("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH"), 'chaine', 0, '', $conf->entity);
85 }
86 if (GETPOSTISSET('INVOICE_ADD_ZATCA_QR_CODE')) {
87 dolibarr_set_const($db, "INVOICE_ADD_ZATCA_QR_CODE", GETPOSTINT("INVOICE_ADD_ZATCA_QR_CODE"), 'chaine', 0, '', $conf->entity);
88 if (GETPOSTINT('INVOICE_ADD_ZATCA_QR_CODE') == 1) {
89 dolibarr_del_const($db, "INVOICE_ADD_SWISS_QR_CODE", $conf->entity);
90 }
91 }
92 if (GETPOSTISSET('INVOICE_ADD_EPC_QR_CODE')) {
93 dolibarr_set_const($db, "INVOICE_ADD_EPC_QR_CODE", GETPOST("INVOICE_ADD_EPC_QR_CODE", 'int'), 'chaine', 0, '', $conf->entity);
94 if (GETPOSTINT('INVOICE_ADD_EPC_QR_CODE') == 1) {
95 dolibarr_del_const($db, "INVOICE_ADD_EPC_QR_CODE", $conf->entity);
96 }
97 }
98 if (GETPOSTISSET('INVOICE_ADD_SWISS_QR_CODE')) {
99 dolibarr_set_const($db, "INVOICE_ADD_SWISS_QR_CODE", GETPOST("INVOICE_ADD_SWISS_QR_CODE", 'alpha'), 'chaine', 0, '', $conf->entity);
100 if (GETPOST('INVOICE_ADD_SWISS_QR_CODE', 'alpha') != '0') {
101 dolibarr_del_const($db, "INVOICE_ADD_ZATCA_QR_CODE", $conf->entity);
102 }
103 }
104 if (GETPOSTISSET('INVOICE_CATEGORY_OF_OPERATION')) {
105 dolibarr_set_const($db, "INVOICE_CATEGORY_OF_OPERATION", GETPOSTINT("INVOICE_CATEGORY_OF_OPERATION"), 'chaine', 0, '', $conf->entity);
106 }
107 if (GETPOSTISSET('INVOICE_SHOW_SHIPPING_ADDRESS')) {
108 dolibarr_set_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", GETPOSTINT("INVOICE_SHOW_SHIPPING_ADDRESS"), 'chaine', 0, '', $conf->entity);
109 dolibarr_del_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", $conf->entity);
110 }
111
112 if (GETPOSTISSET('BARCODE_ON_SHIPPING_PDF')) {
113 dolibarr_set_const($db, "BARCODE_ON_SHIPPING_PDF", GETPOSTINT("BARCODE_ON_SHIPPING_PDF"), 'chaine', 0, '', $conf->entity);
114 }
115 if (GETPOSTISSET('BARCODE_ON_RECEPTION_PDF')) {
116 dolibarr_set_const($db, "BARCODE_ON_RECEPTION_PDF", GETPOSTINT("BARCODE_ON_RECEPTION_PDF"), 'chaine', 0, '', $conf->entity);
117 }
118 if (GETPOSTISSET('BARCODE_ON_STOCKTRANSFER_PDF')) {
119 dolibarr_set_const($db, "BARCODE_ON_STOCKTRANSFER_PDF", GETPOSTINT("BARCODE_ON_STOCKTRANSFER_PDF"), 'chaine', 0, '', $conf->entity);
120 }
121
122 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
123
124 header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
125 exit;
126}
127
128
129
130/*
131 * View
132 */
133
134$wikihelp = 'EN:First_setup|FR:Premiers_param&eacute;trages|ES:Primeras_configuraciones';
135llxHeader('', $langs->trans("Setup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-pdf_other');
136
137$form = new Form($db);
138$formother = new FormOther($db);
139$formadmin = new FormAdmin($db);
140
141print load_fiche_titre($langs->trans("PDF"), '', 'title_setup');
142
143$head = pdf_admin_prepare_head();
144
145print dol_get_fiche_head($head, 'other', '', -1, '');
146
147$tooltiptext = '';
148print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."</span><br>\n";
149print "<br>\n";
150
151print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
152print '<input type="hidden" name="token" value="'.newToken().'">';
153print '<input type="hidden" name="action" value="update">';
154
155if (isModEnabled('propal')) {
156 print load_fiche_titre($langs->trans("Proposal"), '', 'proposal');
157
158 print '<div class="div-table-responsive-no-min">';
159 print '<table summary="more" class="noborder centpercent">';
160 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
161
162 /* This feature seems not yet used into Dolibarr. So option is kept hidden and enabled by default
163 print '<tr class="oddeven"><td>';
164 print $form->textwithpicto($langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"), '');
165 print '</td><td>';
166 if ($conf->use_javascript_ajax) {
167 print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
168 } else {
169 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
170 print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
171 }
172 print '</td></tr>';
173 */
174
175 print '<tr class="oddeven"><td>';
176 print $form->textwithpicto($langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
177 print '</td><td>';
178 if ($conf->use_javascript_ajax) {
179 print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
180 } else {
181 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
182 print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
183 }
184 print '</td></tr>';
185
186 print '</table>';
187 print '</div>';
188}
189
190
191if (isModEnabled('order')) {
192 $langs->load("orders");
193 print load_fiche_titre($langs->trans('CustomersOrders'), '', 'order');
194
195 print '<div class="div-table-responsive-no-min">';
196 print '<table summary="more" class="noborder centpercent">';
197 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
198
199 print '<tr class="oddeven"><td>';
200 print $form->textwithpicto($langs->trans("SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans("SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
201 print '</td><td>';
202 if ($conf->use_javascript_ajax) {
203 print ajax_constantonoff('SALES_ORDER_SHOW_SHIPPING_ADDRESS');
204 } else {
205 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
206 print $form->selectarray("SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->SALES_ORDER_SHOW_SHIPPING_ADDRESS);
207 }
208 print '</td></tr>';
209
210 print '</table>';
211 print '</div>';
212}
213
214
215if (isModEnabled('supplier_proposal')) {
216 $langs->load("supplier_proposal");
217 print load_fiche_titre($langs->trans("SupplierProposal"), '', 'supplier_proposal');
218
219 print '<div class="div-table-responsive-no-min">';
220 print '<table summary="more" class="noborder centpercent">';
221 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
222
223 print '<tr class="oddeven"><td>';
224 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"), '');
225 print '</td><td>';
226 if ($conf->use_javascript_ajax) {
227 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
228 } else {
229 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
230 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE);
231 }
232 print '</td></tr>';
233
234 print '<tr class="oddeven"><td>';
235 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"), '');
236 print '</td><td>';
237 if ($conf->use_javascript_ajax) {
238 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
239 } else {
240 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
241 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN);
242 }
243 print '</td></tr>';
244
245 print '</table>';
246 print '</div>';
247}
248
249
250if (isModEnabled('supplier_order')) {
251 $langs->load("supplier_order");
252 print load_fiche_titre($langs->trans("SupplierOrder"), '', 'supplier_proposal');
253
254 print '<div class="div-table-responsive-no-min">';
255 print '<table summary="more" class="noborder centpercent">';
256 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
257
258 print '<tr class="oddeven"><td>';
259 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"), '');
260 print '</td><td>';
261 if ($conf->use_javascript_ajax) {
262 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
263 } else {
264 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
265 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE);
266 }
267 print '</td></tr>';
268
269 print '<tr class="oddeven"><td>';
270 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"), '');
271 print '</td><td>';
272 if ($conf->use_javascript_ajax) {
273 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
274 } else {
275 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
276 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN);
277 }
278 print '</td></tr>';
279
280 print '</table>';
281 print '</div>';
282}
283
284if (isModEnabled('invoice')) {
285 print load_fiche_titre($langs->trans("Invoices"), '', 'bill');
286
287 print '<div class="div-table-responsive-no-min">';
288 print '<table summary="more" class="noborder centpercent">';
289 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
290
291 print '<tr class="oddeven"><td>';
292 print $form->textwithpicto($langs->trans("INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans("INVOICE_ADD_ZATCA_QR_CODEMore"));
293 print '</td><td>';
294 if ($conf->use_javascript_ajax) {
295 print ajax_constantonoff('INVOICE_ADD_ZATCA_QR_CODE');
296 } else {
297 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
298 print $form->selectarray("INVOICE_ADD_ZATCA_QR_CODE", $arrval, getDolGlobalString('INVOICE_ADD_ZATCA_QR_CODE'));
299 }
300 print '</td></tr>';
301
302 print '<tr class="oddeven"><td>';
303 print $form->textwithpicto($langs->trans("INVOICE_ADD_EPC_QR_CODE"), $langs->trans("INVOICE_ADD_EPC_QR_CODEMore"));
304 print '</td><td>';
305 if ($conf->use_javascript_ajax) {
306 print ajax_constantonoff('INVOICE_ADD_EPC_QR_CODE');
307 } else {
308 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
309 print $form->selectarray("INVOICE_ADD_EPC_QR_CODE", $arrval, getDolGlobalString('INVOICE_ADD_EPC_QR_CODE'));
310 }
311 print '</td></tr>';
312
313 print '<tr class="oddeven"><td>';
314 if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') {
315 print $form->textwithpicto($langs->trans("INVOICE_ADD_SWISS_QR_CODE"), $langs->trans("INVOICE_ADD_SWISS_QR_CODEMore"));
316 } else {
317 print $langs->trans("INVOICE_ADD_SWISS_QR_CODE");
318 }
319 print '</td><td>';
320 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
321 if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 1) {
322 $arrval['bottom'] = $langs->trans("AtBottomOfPage").' ('.$langs->trans("Experimental").' - Need PHP 8.1+ and some PHP libs)';
323 }
324 print $form->selectarray("INVOICE_ADD_SWISS_QR_CODE", $arrval, getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE'));
325 print '</td></tr>';
326
327 // Mention category of operations
328 // French Decret n°2099-1299 2022-10-07
329 print '<tr class="oddeven"><td>';
330 print $form->textwithpicto($langs->trans("InvoiceOptionCategoryOfOperations"), $langs->trans('InvoiceOptionCategoryOfOperationsHelp'), 1);
331 print '</td><td>';
332 $arrval = array('0'=>$langs->trans("No"),
333 '1'=>$langs->trans("InvoiceOptionCategoryOfOperationsYes1"),
334 '2'=>$langs->trans("InvoiceOptionCategoryOfOperationsYes2")
335 );
336 print $form->selectarray("INVOICE_CATEGORY_OF_OPERATION", $arrval, getDolGlobalString('INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
337 print '</td></tr>';
338
339 print '<tr class="oddeven"><td>';
340 print $form->textwithpicto($langs->trans("INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans("INVOICE_SHOW_SHIPPING_ADDRESSMore"));
341 print '</td><td>';
342 if ($conf->use_javascript_ajax) {
343 print ajax_constantonoff('INVOICE_SHOW_SHIPPING_ADDRESS');
344 } else {
345 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
346 print $form->selectarray("INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->INVOICE_SHOW_SHIPPING_ADDRESS);
347 }
348 print '</td></tr>';
349
350 /* Keep this option hidden for the moment to avoid options inflation. We'll see later if it is used enough...
351 print '<tr class="oddeven"><td>';
352 print $form->textwithpicto($langs->trans("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT"), $langs->trans("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore"));
353 print '</td><td>';
354 if ($conf->use_javascript_ajax) {
355 print ajax_constantonoff('SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT');
356 } else {
357 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
358 print $form->selectarray("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT", $arrval, $conf->global->SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT);
359 }
360 print '</td></tr>';
361 */
362
363 print '</table>';
364 print '</div>';
365}
366
367if (isModEnabled('shipping')) {
368 print load_fiche_titre($langs->trans("Shipments"), '', 'shipment');
369
370 print '<div class="div-table-responsive-no-min">';
371 print '<table summary="more" class="noborder centpercent">';
372 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
373
374 print '<tr class="oddeven"><td>';
375 print $langs->trans("BARCODE_ON_SHIPPING_PDF");
376 print '</td><td>';
377 if ($conf->use_javascript_ajax) {
378 print ajax_constantonoff('BARCODE_ON_SHIPPING_PDF');
379 } else {
380 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
381 print $form->selectarray("BARCODE_ON_SHIPPING_PDF", $arrval, getDolGlobalString('BARCODE_ON_SHIPPING_PDF'));
382 }
383 print '</td></tr>';
384 print '</table>';
385 print '</div>';
386}
387
388
389if (isModEnabled('reception')) {
390 print load_fiche_titre($langs->trans("Receptions"), '', 'reception');
391
392 print '<div class="div-table-responsive-no-min">';
393 print '<table summary="more" class="noborder centpercent">';
394 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
395
396 print '<tr class="oddeven"><td>';
397 print $langs->trans("RECEPTION_PDF_HIDE_ORDERED");
398 print '</td><td>';
399 if ($conf->use_javascript_ajax) {
400 print ajax_constantonoff('RECEPTION_PDF_HIDE_ORDERED');
401 } else {
402 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
403 print $form->selectarray("RECEPTION_PDF_HIDE_ORDERED", $arrval, getDolGlobalString('RECEPTION_PDF_HIDE_ORDERED'));
404 }
405 print '</td></tr>';
406
407 print '<tr class="oddeven"><td>';
408 print $langs->trans("MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
409 print '</td><td>';
410 if ($conf->use_javascript_ajax) {
411 print ajax_constantonoff('MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
412 } else {
413 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
414 print $form->selectarray("MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval, getDolGlobalString('MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
415 }
416 print '</td></tr>';
417
418 print '<tr class="oddeven"><td>';
419 print $langs->trans("BARCODE_ON_RECEPTION_PDF");
420 print '</td><td>';
421 if ($conf->use_javascript_ajax) {
422 print ajax_constantonoff('BARCODE_ON_RECEPTION_PDF');
423 } else {
424 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
425 print $form->selectarray("BARCODE_ON_RECEPTION_PDF", $arrval, getDolGlobalString('BARCODE_ON_RECEPTION_PDF'));
426 }
427 print '</td></tr>';
428 print '</table>';
429 print '</div>';
430}
431
432if (isModEnabled('stocktransfer')) {
433 print load_fiche_titre($langs->trans("StockTransfer"), '', 'stock');
434
435 print '<div class="div-table-responsive-no-min">';
436 print '<table summary="more" class="noborder centpercent">';
437 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
438
439 print '<tr class="oddeven"><td>';
440 print $langs->trans("BARCODE_ON_STOCKTRANSFER_PDF");
441 print '</td><td>';
442 if ($conf->use_javascript_ajax) {
443 print ajax_constantonoff('BARCODE_ON_STOCKTRANSFER_PDF');
444 } else {
445 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
446 print $form->selectarray("BARCODE_ON_STOCKTRANSFER_PDF", $arrval, getDolGlobalString('BARCODE_ON_STOCKTRANSFER_PDF'));
447 }
448 print '</td></tr>';
449
450 print '</table>';
451 print '</div>';
452}
453
454
455print '<br><div class="center">';
456print '<input class="button button-save" type="submit" name="save" value="'.$langs->trans("Save").'">';
457print '</div>';
458
459print '</form>';
460
461
462// End of page
463llxFooter();
464$db->close();
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.
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 generate html code for admin pages.
Class to manage generation of HTML components Only common components must be here.
Class permettant la generation de composants html autre Only common components are here.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
pdf_admin_prepare_head()
Return array head with list of tabs to view object information.
Definition pdf.lib.php:48
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.