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