dolibarr 25.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-2024 Anthony Berton <anthony.berton@bb2a.fr>
8 * Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
9 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
10 * Copyright (C) 2024-2025 Nick Fragoulis
11 * Copyright (C) 2025 William Mead <william@m34d.com>
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see <https://www.gnu.org/licenses/>.
25 */
26
32// Load Dolibarr environment
33require '../main.inc.php';
42require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
43require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
44require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
45require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
46require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
47require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
48require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
49require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
50
51// Load translation files required by the page
52$langs->loadLangs(array('admin', 'bills', 'companies', 'languages', 'members', 'other', 'products', 'propal', 'receptions', 'stocks', 'trips', 'orders', 'sendings'));
53
54if (!$user->admin) {
56}
57
58$action = GETPOST('action', 'aZ09');
59$modulepart = GETPOST('modulepart', 'aZ09');
60
61$diroffile = '';
62$varname = '';
63if ($modulepart == 'propal') {
64 $diroffile = $conf->propal->dir_output;
65 $varname = 'MAIN_INFO_PROPAL_TERMSOFSALE';
66}
67if ($modulepart == 'order') {
68 $diroffile = $conf->order->dir_output;
69 $varname = 'MAIN_INFO_ORDER_TERMSOFSALE';
70}
71if ($modulepart == 'contrat') {
72 $diroffile = $conf->contract->dir_output;
73 $varname = 'MAIN_INFO_CONTRACT_TERMSOFSALE';
74}
75if ($modulepart == 'invoice') {
76 $diroffile = $conf->invoice->dir_output;
77 $varname = 'MAIN_INFO_INVOICE_TERMSOFSALE';
78}
79
80
81/*
82 * Actions
83 */
84
85if ($action == 'update') {
86 if (GETPOSTISSET('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
87 dolibarr_set_const($db, "MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", GETPOST("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"), 'chaine', 0, '', $conf->entity);
88 }
89 if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
90 dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
91 }
92 if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
93 dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTMODE", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTMODE"), 'chaine', 0, '', $conf->entity);
94 }
95 if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
96 dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity);
97 }
98 if (GETPOSTISSET('PROPOSAL_SHOW_SHIPPING_ADDRESS')) {
99 dolibarr_set_const($db, "PROPOSAL_SHOW_SHIPPING_ADDRESS", GETPOSTINT("PROPOSAL_SHOW_SHIPPING_ADDRESS"), 'chaine', 0, '', $conf->entity);
100 }
101 if (GETPOSTISSET('SALES_ORDER_SHOW_SHIPPING_ADDRESS')) {
102 dolibarr_set_const($db, "SALES_ORDER_SHOW_SHIPPING_ADDRESS", GETPOSTINT("SALES_ORDER_SHOW_SHIPPING_ADDRESS"), 'chaine', 0, '', $conf->entity);
103 dolibarr_del_const($db, "SALES_ORDER_SHOW_SHIPPING_ADDRESS", $conf->entity);
104 }
105 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
106 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);
107 }
108 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
109 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);
110 }
111 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
112 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);
113 }
114 if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
115 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);
116 }
117 if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
118 dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOSTINT("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH"), 'chaine', 0, '', $conf->entity);
119 }
120 if (GETPOSTISSET('MAIN_PDF_ADD_TERMSOFSALE_PROPAL')) {
121 dolibarr_set_const($db, "MAIN_PDF_ADD_TERMSOFSALE_PROPAL", GETPOST("MAIN_PDF_ADD_TERMSOFSALE_PROPAL", 'int'), 'chaine', 0, '', $conf->entity);
122 }
123 if (GETPOSTISSET('MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
124 dolibarr_set_const($db, "MAIN_PDF_ADD_TERMSOFSALE_ORDER", GETPOST("MAIN_PDF_ADD_TERMSOFSALE_ORDER", 'int'), 'chaine', 0, '', $conf->entity);
125 }
126 if (GETPOSTISSET('MAIN_PDF_ADD_TERMSOFSALE_CONTRACT')) {
127 dolibarr_set_const($db, "MAIN_PDF_ADD_TERMSOFSALE_CONTRACT", GETPOST("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT", 'int'), 'chaine', 0, '', $conf->entity);
128 }
129 if (GETPOSTISSET('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
130 dolibarr_set_const($db, "MAIN_PDF_ADD_TERMSOFSALE_INVOICE", GETPOST("MAIN_PDF_ADD_TERMSOFSALE_INVOICE", 'int'), 'chaine', 0, '', $conf->entity);
131 }
132 if (GETPOSTISSET('INVOICE_ADD_ZATCA_QR_CODE')) {
133 dolibarr_set_const($db, "INVOICE_ADD_ZATCA_QR_CODE", GETPOSTINT("INVOICE_ADD_ZATCA_QR_CODE"), 'chaine', 0, '', $conf->entity);
134 if (GETPOSTINT('INVOICE_ADD_ZATCA_QR_CODE') == 1) {
135 dolibarr_del_const($db, "INVOICE_ADD_SWISS_QR_CODE", $conf->entity);
136 }
137 }
138 if (GETPOSTISSET('INVOICE_ADD_EPC_QR_CODE')) {
139 dolibarr_set_const($db, "INVOICE_ADD_EPC_QR_CODE", GETPOST("INVOICE_ADD_EPC_QR_CODE", 'int'), 'chaine', 0, '', $conf->entity);
140 if (GETPOSTINT('INVOICE_ADD_EPC_QR_CODE') == 1) {
141 dolibarr_del_const($db, "INVOICE_ADD_EPC_QR_CODE", $conf->entity);
142 }
143 }
144 if (GETPOSTISSET('INVOICE_ADD_SWISS_QR_CODE')) {
145 dolibarr_set_const($db, "INVOICE_ADD_SWISS_QR_CODE", GETPOST("INVOICE_ADD_SWISS_QR_CODE", 'alpha'), 'chaine', 0, '', $conf->entity);
146 if (GETPOST('INVOICE_ADD_SWISS_QR_CODE', 'alpha') != '0') {
147 dolibarr_del_const($db, "INVOICE_ADD_ZATCA_QR_CODE", $conf->entity);
148 }
149 }
150 if (GETPOSTISSET('INVOICE_CATEGORY_OF_OPERATION')) {
151 dolibarr_set_const($db, "INVOICE_CATEGORY_OF_OPERATION", GETPOSTINT("INVOICE_CATEGORY_OF_OPERATION"), 'chaine', 0, '', $conf->entity);
152 }
153 if (GETPOSTISSET('INVOICE_SHOW_SHIPPING_ADDRESS')) {
154 dolibarr_set_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", GETPOSTINT("INVOICE_SHOW_SHIPPING_ADDRESS"), 'chaine', 0, '', $conf->entity);
155 dolibarr_del_const($db, "INVOICE_SHOW_SHIPPING_ADDRESS", $conf->entity);
156 }
157 if (GETPOSTISSET('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
158 dolibarr_set_const($db, "PDF_INVOICE_SHOW_VAT_ANALYSIS", GETPOSTINT("PDF_INVOICE_SHOW_VAT_ANALYSIS"), 'chaine', 0, '', $conf->entity);
159 dolibarr_del_const($db, "PDF_INVOICE_SHOW_VAT_ANALYSIS", $conf->entity);
160 }
161 if (GETPOSTISSET('PDF_INVOICE_SHOW_BALANCE_SUMMARY')) {
162 dolibarr_set_const($db, "PDF_INVOICE_SHOW_BALANCE_SUMMARY", GETPOSTINT("PDF_INVOICE_SHOW_BALANCE_SUMMARY"), 'chaine', 0, '', $conf->entity);
163 dolibarr_del_const($db, "PDF_INVOICE_SHOW_BALANCE_SUMMARY", $conf->entity);
164 }
165 if (GETPOSTISSET('INVOICE_HIDE_LINKED_OBJECT')) {
166 dolibarr_set_const($db, "INVOICE_HIDE_LINKED_OBJECT", GETPOSTINT("INVOICE_HIDE_LINKED_OBJECT"), 'chaine', 0, '', $conf->entity);
167 }
168 if (GETPOSTISSET('BARCODE_ON_SHIPPING_PDF')) {
169 dolibarr_set_const($db, "BARCODE_ON_SHIPPING_PDF", GETPOSTINT("BARCODE_ON_SHIPPING_PDF"), 'chaine', 0, '', $conf->entity);
170 }
171 if (GETPOSTISSET('BARCODE_ON_RECEPTION_PDF')) {
172 dolibarr_set_const($db, "BARCODE_ON_RECEPTION_PDF", GETPOSTINT("BARCODE_ON_RECEPTION_PDF"), 'chaine', 0, '', $conf->entity);
173 }
174 if (GETPOSTISSET('BARCODE_ON_STOCKTRANSFER_PDF')) {
175 dolibarr_set_const($db, "BARCODE_ON_STOCKTRANSFER_PDF", GETPOSTINT("BARCODE_ON_STOCKTRANSFER_PDF"), 'chaine', 0, '', $conf->entity);
176 }
177 // add a file to concat
178 $concat_options = array('MAIN_INFO_PROPAL_TERMSOFSALE', 'MAIN_INFO_ORDER_TERMSOFSALE', 'MAIN_INFO_CONTRACT_TERMSOFSALE', 'MAIN_INFO_INVOICE_TERMSOFSALE');
179 foreach ($concat_options as $varname) {
180 if (isset($_FILES[$varname]) && $_FILES[$varname]["name"]) {
181 if (!preg_match('/(\.pdf)$/i', $_FILES[$varname]["name"])) { // Document can be used on a lot of different places. Only pdf can be supported.
182 $langs->load("errors");
183 setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors');
184 } else {
185 switch ($varname) {
186 case 'MAIN_INFO_PROPAL_TERMSOFSALE':
187 $diroffile = $conf->propal->dir_output;
188 break;
189 case 'MAIN_INFO_ORDER_TERMSOFSALE':
190 $diroffile = $conf->order->dir_output;
191 break;
192 case 'MAIN_INFO_CONTRACT_TERMSOFSALE':
193 $diroffile = $conf->contract->dir_output;
194 break;
195 case 'MAIN_INFO_INVOICE_TERMSOFSALE':
196 $diroffile = $conf->invoice->dir_output;
197 break;
198 }
199 if ($diroffile) {
200 $dirforterms = $diroffile.'/';
201 $original_file = $_FILES[$varname]["name"];
202 $result = dol_move_uploaded_file($_FILES[$varname]["tmp_name"], $dirforterms.$original_file, 1, 0, $_FILES[$varname]['error']);
203 if ((int) $result > 0) {
204 dolibarr_set_const($db, $varname, $original_file, 'chaine', 0, '', $conf->entity);
205 }
206 }
207 }
208 }
209 }
210
211 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
212
213 header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
214 exit;
215}
216// Remove file to concat
217if ($action == 'removetermsofsale') {
218 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
219
220 $filename = getDolGlobalString($varname);
221 if ($filename != '') {
222 $file = dol_sanitizePathName($diroffile).'/'.dol_sanitizeFileName($filename);
223 dol_delete_file($file);
224 }
225 dolibarr_del_const($db, $varname, $conf->entity);
226}
227
228
229/*
230 * View
231 */
232
233$wikihelp = 'EN:First_setup|FR:Premiers_param&eacute;trages|ES:Primeras_configuraciones';
234llxHeader('', $langs->trans("Setup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-pdf_other');
235
236$form = new Form($db);
237$formother = new FormOther($db);
238$formadmin = new FormAdmin($db);
239$formfile = new FormFile($db);
240
241print load_fiche_titre($langs->trans("PDF"), '', 'title_setup');
242
243$head = pdf_admin_prepare_head();
244
245print dol_get_fiche_head($head, 'other', '', -1, '');
246
247$tooltiptext = '';
248print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."</span><br>\n";
249print "<br>\n";
250
251
252$maxfilesizearray = getMaxFileSizeArray();
253$tooltipconcatpdf = ($maxfilesizearray['maxmin'] > 0) ? $langs->trans('MaxSize').' : '.$maxfilesizearray['maxmin'].' '.$langs->trans('Kb') : '';
254
255$documenturl = getDolGlobalString('DOL_URL_ROOT_DOCUMENT_PHP', DOL_URL_ROOT.'/document.php');
256
257
258print '<form enctype="multipart/form-data" method="post" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'" spellcheck="false">';
259print '<input type="hidden" name="token" value="'.newToken().'">';
260print '<input type="hidden" name="action" value="update">';
261
262if (isModEnabled('propal')) {
263 print '<div id="proposal" class="anchorundermenu"></div>';
264
265 print load_fiche_titre($langs->trans("Proposal"), '', 'proposal');
266 print '<div class="div-table-responsive-no-min">';
267 print '<table summary="more" class="noborder centpercent">';
268 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
269
270 /* This feature seems not yet used into Dolibarr. So option is kept hidden and enabled by default
271 print '<tr class="oddeven"><td>';
272 print $form->textwithpicto($langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"), '');
273 print '</td><td>';
274 if ($conf->use_javascript_ajax) {
275 print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
276 } else {
277 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
278 print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING'));
279 }
280 print '</td></tr>';
281 */
282
283 print '<tr class="oddeven"><td>';
284 print $form->textwithpicto($langs->trans("PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans("AvailableWithSomePDFTemplatesOnly"));
285 print '</td><td>';
286 if ($conf->use_javascript_ajax) {
287 print ajax_constantonoff('PDF_PROPAL_SHOW_PRICE_INCL_TAX');
288 } else {
289 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
290 print $form->selectarray("PDF_PROPAL_SHOW_PRICE_INCL_TAX", $arrval, getDolGlobalString('PDF_PROPAL_SHOW_PRICE_INCL_TAX'));
291 }
292 print '</td></tr>';
293
294 print '<tr class="oddeven"><td>';
295 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
296 print '</td><td>';
297 if ($conf->use_javascript_ajax) {
298 print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
299 } else {
300 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
301 print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, getDolGlobalString('MAIN_GENERATE_PROPOSALS_WITH_PICTURE'));
302 }
303 print '</td></tr>';
304
305 // Add delivery address option for proposals
306 print '<tr class="oddeven"><td>';
307 print $form->textwithpicto($langs->trans("PROPOSAL_SHOW_SHIPPING_ADDRESS"), $langs->trans("PROPOSAL_SHOW_SHIPPING_ADDRESSMore"));
308 print '</td><td>';
309 if ($conf->use_javascript_ajax) {
310 print ajax_constantonoff('PROPOSAL_SHOW_SHIPPING_ADDRESS');
311 } else {
312 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
313 print $form->selectarray("PROPOSAL_SHOW_SHIPPING_ADDRESS", $arrval, getDolGlobalString('PROPOSAL_SHOW_SHIPPING_ADDRESS'));
314 }
315 print '</td></tr>';
316
317 // Concat PDF
318 print '<tr class="oddeven"><td>';
319 print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_PROPAL"), $tooltipconcatpdf);
320 print '</td><td>';
321 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("YesAddedByDefault"), '2' => $langs->trans("YesNotAddedByDefault"));
322 print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_PROPAL", $arrval, getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_PROPAL'));
323
324 if (getDolGlobalString("MAIN_PDF_ADD_TERMSOFSALE_PROPAL")) {
325 $modulepart = 'propal';
326 print '<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
327 print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_PROPAL_TERMSOFSALE" id="MAIN_INFO_PROPAL_TERMSOFSALE" accept="application/pdf">';
328 print '</div>';
329 if (getDolGlobalString("MAIN_INFO_PROPAL_TERMSOFSALE")) {
330 $termofsale = getDolGlobalString("MAIN_INFO_PROPAL_TERMSOFSALE");
331 if (file_exists($conf->propal->dir_output.'/'.$termofsale)) {
332 $file = dol_dir_list($conf->propal->dir_output, 'files', 0, $termofsale);
333 print ' ';
334 print '<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($termofsale).'">'.$termofsale.'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0, '').'</div>';
335 print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removetermsofsale&modulepart='.$modulepart.'&token='.newToken().'">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
336 }
337 }
338 print '</div>';
339 }
340 print '</td></tr>';
341
342 print '</table>';
343 print '</div>';
344
345 print '<br>';
346}
347
348if (isModEnabled('order')) {
349 print '<div id="order" class="anchorundermenu"></div>';
350
351 $langs->load("orders");
352 print load_fiche_titre($langs->trans('CustomersOrders'), '', 'order');
353
354 print '<div class="div-table-responsive-no-min">';
355 print '<table summary="more" class="noborder centpercent">';
356
357 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px"></td></tr>';
358
359 print '<tr class="oddeven"><td>';
360 print $form->textwithpicto($langs->trans("PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans("AvailableWithSomePDFTemplatesOnly"));
361 print '</td><td>';
362 if ($conf->use_javascript_ajax) {
363 print ajax_constantonoff('PDF_ORDER_SHOW_PRICE_INCL_TAX');
364 } else {
365 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
366 print $form->selectarray("PDF_ORDER_SHOW_PRICE_INCL_TAX", $arrval, getDolGlobalString('PDF_ORDER_SHOW_PRICE_INCL_TAX'));
367 }
368 print '</td></tr>';
369
370 print '<tr class="oddeven"><td>';
371 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
372 print '</td><td>';
373 if ($conf->use_javascript_ajax) {
374 print ajax_constantonoff('MAIN_GENERATE_ORDERS_WITH_PICTURE');
375 } else {
376 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
377 print $form->selectarray("MAIN_GENERATE_ORDERS_WITH_PICTURE", $arrval, getDolGlobalString('MAIN_GENERATE_ORDERS_WITH_PICTURE'));
378 }
379 print '</td></tr>';
380
381 print '<tr class="oddeven"><td>';
382 print $form->textwithpicto($langs->trans("SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans("SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
383 print '</td><td>';
384 if ($conf->use_javascript_ajax) {
385 print ajax_constantonoff('SALES_ORDER_SHOW_SHIPPING_ADDRESS');
386 } else {
387 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
388 print $form->selectarray("SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval, getDolGlobalString('SALES_ORDER_SHOW_SHIPPING_ADDRESS'));
389 }
390 print '</td></tr>';
391
392 // Concat PDF
393 print '<tr class="oddeven"><td>';
394 print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_ORDER"), '');
395 print '</td><td>';
396 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("YesAddedByDefault"), '2' => $langs->trans("YesNotAddedByDefault"));
397 print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_ORDER", $arrval, getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_ORDER'));
398
399 if (getDolGlobalString("MAIN_PDF_ADD_TERMSOFSALE_ORDER")) {
400 $modulepart = 'order';
401 print '<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
402 print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_ORDER_TERMSOFSALE" id="MAIN_INFO_ORDER_TERMSOFSALE" accept="application/pdf">';
403 print '</div>';
404 if (getDolGlobalString("MAIN_INFO_ORDER_TERMSOFSALE")) {
405 $termofsale = getDolGlobalString("MAIN_INFO_ORDER_TERMSOFSALE");
406 if (file_exists($conf->order->dir_output.'/'.$termofsale)) {
407 $file = dol_dir_list($conf->order->dir_output, 'files', 0, $termofsale);
408 print ' ';
409 print '<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($termofsale).'">'.$termofsale.'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0, '').'</div>';
410 print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removetermsofsale&modulepart='.$modulepart.'&token='.newToken().'">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
411 }
412 }
413 print '</div>';
414 }
415
416 print '</td></tr>';
417
418 print '</table>';
419 print '</div>';
420
421 print '<br>';
422}
423
424if (isModEnabled('contract')) {
425 print '<div id="contrat" class="anchorundermenu"></div>';
426
427 print load_fiche_titre($langs->trans("Contract"), '', 'contract');
428 print '<div class="div-table-responsive-no-min">';
429 print '<table summary="more" class="noborder centpercent">';
430 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
431
432 // Concat PDF
433 print '<tr class="oddeven"><td>';
434 print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT"), $tooltipconcatpdf);
435 print '</td><td>';
436 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("YesAddedByDefault"), '2' => $langs->trans("YesNotAddedByDefault"));
437 print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT", $arrval, getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_CONTRACT'));
438
439 if (getDolGlobalString("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT")) {
440 $modulepart = 'contrat';
441 print '<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
442 print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_CONTRACT_TERMSOFSALE" id="MAIN_INFO_CONTRACT_TERMSOFSALE" accept="application/pdf">';
443 print '</div>';
444 if (getDolGlobalString("MAIN_INFO_CONTRACT_TERMSOFSALE")) {
445 $termofsale = getDolGlobalString("MAIN_INFO_CONTRACT_TERMSOFSALE");
446 if (file_exists($conf->contract->dir_output.'/'.$termofsale)) {
447 $file = dol_dir_list($conf->contract->dir_output, 'files', 0, $termofsale);
448 print ' ';
449 print '<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($termofsale).'">'.$termofsale.'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0, '').'</div>';
450 print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removetermsofsale&modulepart='.$modulepart.'&token='.newToken().'">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
451 }
452 }
453 print '</div>';
454 }
455 print '</td></tr>';
456
457 print '</table>';
458 print '</div>';
459
460 print '<br>';
461}
462
463
464if (isModEnabled('invoice')) {
465 print '<div id="invoice" class="anchorundermenu"></div>';
466
467 print load_fiche_titre($langs->trans("Invoices"), '', 'bill');
468
469 print '<div class="div-table-responsive-no-min">';
470 print '<table summary="more" class="noborder centpercent">';
471 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px"></td></tr>';
472
473 print '<tr class="oddeven"><td>';
474 print $form->textwithpicto($langs->trans("PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans("AvailableWithSomePDFTemplatesOnly"));
475 print '</td><td>';
476 if ($conf->use_javascript_ajax) {
477 print ajax_constantonoff('PDF_INVOICE_SHOW_PRICE_INCL_TAX');
478 } else {
479 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
480 print $form->selectarray("PDF_INVOICE_SHOW_PRICE_INCL_TAX", $arrval, getDolGlobalString('PDF_INVOICE_SHOW_PRICE_INCL_TAX'));
481 }
482 print '</td></tr>';
483
484 print '<tr class="oddeven"><td>';
485 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral"));
486 print '</td><td>';
487 if ($conf->use_javascript_ajax) {
488 print ajax_constantonoff('MAIN_GENERATE_INVOICES_WITH_PICTURE');
489 } else {
490 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
491 print $form->selectarray("MAIN_GENERATE_INVOICES_WITH_PICTURE", $arrval, getDolGlobalString('MAIN_GENERATE_INVOICES_WITH_PICTURE'));
492 }
493 print '</td></tr>';
494
495 print '<tr class="oddeven"><td>';
496 print $form->textwithpicto($langs->trans("INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans("INVOICE_SHOW_SHIPPING_ADDRESSMore"));
497 print '</td><td>';
498 if ($conf->use_javascript_ajax) {
499 print ajax_constantonoff('INVOICE_SHOW_SHIPPING_ADDRESS');
500 } else {
501 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
502 print $form->selectarray("INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, getDolGlobalString('INVOICE_SHOW_SHIPPING_ADDRESS'));
503 }
504 print '</td></tr>';
505
506 // Concat PDF
507 print '<tr class="oddeven"><td>';
508 print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_INVOICE"), '');
509 print '</td><td>';
510 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("YesAddedByDefault"), '2' => $langs->trans("YesNotAddedByDefault"));
511 print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_INVOICE", $arrval, getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE'));
512
513 if (getDolGlobalString("MAIN_PDF_ADD_TERMSOFSALE_INVOICE")) {
514 $modulepart = 'invoice';
515 print '<div class="inline-block nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
516 print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_INVOICE_TERMSOFSALE" id="MAIN_INFO_INVOICE_TERMSOFSALE" accept="application/pdf">';
517 print '</div>';
518 if (getDolGlobalString("MAIN_INFO_INVOICE_TERMSOFSALE")) {
519 $termofsale = getDolGlobalString("MAIN_INFO_INVOICE_TERMSOFSALE");
520 if (file_exists($conf->invoice->dir_output.'/'.$termofsale)) {
521 $file = dol_dir_list($conf->invoice->dir_output, 'files', 0, $termofsale);
522 print ' ';
523 print '<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($termofsale).'">'.$termofsale.'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0, '').'</div>';
524 print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removetermsofsale&modulepart='.$modulepart.'&token='.newToken().'">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
525 }
526 }
527 print '</div>';
528 }
529 print '</td></tr>';
530
531 // QR Codes
532 print '<tr class="oddeven"><td>';
533 print $form->textwithpicto($langs->trans("INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans("INVOICE_ADD_ZATCA_QR_CODEMore"));
534 print '</td><td>';
535 if ($conf->use_javascript_ajax) {
536 print ajax_constantonoff('INVOICE_ADD_ZATCA_QR_CODE');
537 } else {
538 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
539 print $form->selectarray("INVOICE_ADD_ZATCA_QR_CODE", $arrval, getDolGlobalString('INVOICE_ADD_ZATCA_QR_CODE'));
540 }
541 print '</td></tr>';
542
543 print '<tr class="oddeven"><td>';
544 print $form->textwithpicto($langs->trans("INVOICE_ADD_EPC_QR_CODE"), $langs->trans("INVOICE_ADD_EPC_QR_CODEMore"));
545 print '</td><td>';
546 if ($conf->use_javascript_ajax) {
547 print ajax_constantonoff('INVOICE_ADD_EPC_QR_CODE');
548 } else {
549 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
550 print $form->selectarray("INVOICE_ADD_EPC_QR_CODE", $arrval, getDolGlobalString('INVOICE_ADD_EPC_QR_CODE'));
551 }
552 print '</td></tr>';
553
554 print '<tr class="oddeven"><td>';
555 if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') {
556 print $form->textwithpicto($langs->trans("INVOICE_ADD_SWISS_QR_CODE"), $langs->trans("INVOICE_ADD_SWISS_QR_CODEMore"));
557 } else {
558 print $langs->trans("INVOICE_ADD_SWISS_QR_CODE");
559 }
560 print '</td><td>';
561 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
562 if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 1) {
563 $arrval['bottom'] = $langs->trans("AtBottomOfPage").' ('.$langs->trans("Experimental").' - Need PHP 8.1+ and some PHP libs)';
564 }
565 print $form->selectarray("INVOICE_ADD_SWISS_QR_CODE", $arrval, getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE'));
566 print '</td></tr>';
567
568 // Mention category of operations
569 // French Decret n°2099-1299 2022-10-07
570 print '<tr class="oddeven"><td>';
571 print $form->textwithpicto($langs->trans("InvoiceOptionCategoryOfOperations"), $langs->trans('InvoiceOptionCategoryOfOperationsHelp'), 1);
572 print '</td><td>';
573 $arrval = array('0'=>$langs->trans("No"),
574 '1'=>$langs->trans("InvoiceOptionCategoryOfOperationsYes1"),
575 '2'=>$langs->trans("InvoiceOptionCategoryOfOperationsYes2")
576 );
577 print $form->selectarray("INVOICE_CATEGORY_OF_OPERATION", $arrval, getDolGlobalString('INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
578 print '</td></tr>';
579
580 print '<tr class="oddeven"><td>';
581 print $form->textwithpicto($langs->trans("PDF_INVOICE_SHOW_VAT_ANALYSIS"), '');
582 print '</td><td>';
583 if ($conf->use_javascript_ajax) {
584 print ajax_constantonoff('PDF_INVOICE_SHOW_VAT_ANALYSIS');
585 } else {
586 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
587 print $form->selectarray("PDF_INVOICE_SHOW_VAT_ANALYSIS", $arrval, getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS'));
588 }
589 print '</td></tr>';
590
591
592 print '<tr class="oddeven"><td>';
593 print $form->textwithpicto($langs->trans("PDF_INVOICE_SHOW_BALANCE_SUMMARY"), '');
594 print '</td><td>';
595 if ($conf->use_javascript_ajax) {
596 print ajax_constantonoff('PDF_INVOICE_SHOW_BALANCE_SUMMARY');
597 } else {
598 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
599 print $form->selectarray("PDF_INVOICE_SHOW_BALANCE_SUMMARY", $arrval, getDolGlobalInt('PDF_INVOICE_SHOW_BALANCE_SUMMARY'));
600 }
601 print '</td></tr>';
602
603 /* Keep this option hidden for the moment to avoid options inflation. We'll see later if it is used enough...
604 print '<tr class="oddeven"><td>';
605 print $form->textwithpicto($langs->trans("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT"), $langs->trans("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore"));
606 print '</td><td>';
607 if ($conf->use_javascript_ajax) {
608 print ajax_constantonoff('SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT');
609 } else {
610 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
611 print $form->selectarray("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT", $arrval, getDolGlobalInt('SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT'));
612 }
613 print '</td></tr>';
614 */
615 print '<tr class="oddeven"><td>';
616 print $form->textwithpicto($langs->trans("INVOICE_HIDE_LINKED_OBJECT"), $langs->trans("INVOICE_HIDE_LINKED_OBJECTMore"));
617 print '</td><td>';
618 if ($conf->use_javascript_ajax) {
619 print ajax_constantonoff('INVOICE_HIDE_LINKED_OBJECT');
620 } else {
621 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
622 print $form->selectarray("INVOICE_HIDE_LINKED_OBJECT", $arrval, getDolGlobalString('INVOICE_HIDE_LINKED_OBJECT'));
623 }
624 print '</td></tr>';
625
626 print '</table>';
627 print '</div>';
628
629 print '<br>';
630}
631
632
633if (isModEnabled('supplier_proposal')) {
634 print '<div id="supplier_proposal"></div>';
635
636 $langs->load("supplier_proposal");
637 print load_fiche_titre($langs->trans("SupplierProposal"), '', 'supplier_proposal');
638
639 print '<div class="div-table-responsive-no-min">';
640 print '<table summary="more" class="noborder centpercent">';
641 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
642
643 print '<tr class="oddeven"><td>';
644 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"), '');
645 print '</td><td>';
646 if ($conf->use_javascript_ajax) {
647 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
648 } else {
649 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
650 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE'));
651 }
652 print '</td></tr>';
653
654 print '<tr class="oddeven"><td>';
655 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"), '');
656 print '</td><td>';
657 if ($conf->use_javascript_ajax) {
658 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
659 } else {
660 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
661 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN'));
662 }
663 print '</td></tr>';
664
665 print '</table>';
666 print '</div>';
667
668 print '<br>';
669}
670
671
672if (isModEnabled('supplier_order')) {
673 print '<div id="supplier_order"></div>';
674
675 $langs->load("supplier_order");
676 print load_fiche_titre($langs->trans("SupplierOrder"), '', 'supplier_proposal');
677
678 print '<div class="div-table-responsive-no-min">';
679 print '<table summary="more" class="noborder centpercent">';
680 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
681
682 print '<tr class="oddeven"><td>';
683 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"), '');
684 print '</td><td>';
685 if ($conf->use_javascript_ajax) {
686 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
687 } else {
688 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
689 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE'));
690 }
691 print '</td></tr>';
692
693 print '<tr class="oddeven"><td>';
694 print $form->textwithpicto($langs->trans("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"), '');
695 print '</td><td>';
696 if ($conf->use_javascript_ajax) {
697 print ajax_constantonoff('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
698 } else {
699 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
700 print $form->selectarray("MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval, getDolGlobalString('MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN'));
701 }
702 print '</td></tr>';
703
704 print '</table>';
705 print '</div>';
706
707 print '<br>';
708}
709
710if (isModEnabled('shipping')) {
711 print '<div id="shipping"></div>';
712
713 print load_fiche_titre($langs->trans("Shipments"), '', 'shipment');
714
715 print '<div class="div-table-responsive-no-min">';
716 print '<table summary="more" class="noborder centpercent">';
717 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px"></td></tr>';
718
719 print '<tr class="oddeven"><td>';
720 print $langs->trans("BARCODE_ON_SHIPPING_PDF");
721 print '</td><td>';
722 if ($conf->use_javascript_ajax) {
723 print ajax_constantonoff('BARCODE_ON_SHIPPING_PDF');
724 } else {
725 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
726 print $form->selectarray("BARCODE_ON_SHIPPING_PDF", $arrval, getDolGlobalString('BARCODE_ON_SHIPPING_PDF'));
727 }
728 print '</td></tr>';
729 print '</table>';
730 print '</div>';
731
732 print '<br>';
733}
734
735if (isModEnabled('reception')) {
736 print '<div id="reception"></div>';
737
738 print load_fiche_titre($langs->trans("Receptions"), '', 'reception');
739
740 print '<div class="div-table-responsive-no-min">';
741 print '<table summary="more" class="noborder centpercent">';
742 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px"></td></tr>';
743
744 print '<tr class="oddeven"><td>';
745 print $langs->trans("RECEPTION_PDF_HIDE_ORDERED");
746 print '</td><td>';
747 if ($conf->use_javascript_ajax) {
748 print ajax_constantonoff('RECEPTION_PDF_HIDE_ORDERED');
749 } else {
750 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
751 print $form->selectarray("RECEPTION_PDF_HIDE_ORDERED", $arrval, getDolGlobalString('RECEPTION_PDF_HIDE_ORDERED'));
752 }
753 print '</td></tr>';
754
755 print '<tr class="oddeven"><td>';
756 print $langs->trans("MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
757 print '</td><td>';
758 if ($conf->use_javascript_ajax) {
759 print ajax_constantonoff('MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
760 } else {
761 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
762 print $form->selectarray("MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval, getDolGlobalString('MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
763 }
764 print '</td></tr>';
765
766 print '<tr class="oddeven"><td>';
767 print $langs->trans("BARCODE_ON_RECEPTION_PDF");
768 print '</td><td>';
769 if ($conf->use_javascript_ajax) {
770 print ajax_constantonoff('BARCODE_ON_RECEPTION_PDF');
771 } else {
772 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
773 print $form->selectarray("BARCODE_ON_RECEPTION_PDF", $arrval, getDolGlobalString('BARCODE_ON_RECEPTION_PDF'));
774 }
775 print '</td></tr>';
776 print '</table>';
777 print '</div>';
778
779 print '<br>';
780}
781
782if (isModEnabled('stocktransfer')) {
783 print '<div id="stocktransfer"></div>';
784
785 print load_fiche_titre($langs->trans("StockTransfer"), '', 'stock');
786
787 print '<div class="div-table-responsive-no-min">';
788 print '<table summary="more" class="noborder centpercent">';
789 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameters").'</td><td width="200px"></td></tr>';
790
791 print '<tr class="oddeven"><td>';
792 print $langs->trans("BARCODE_ON_STOCKTRANSFER_PDF");
793 print '</td><td>';
794 if ($conf->use_javascript_ajax) {
795 print ajax_constantonoff('BARCODE_ON_STOCKTRANSFER_PDF');
796 } else {
797 $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
798 print $form->selectarray("BARCODE_ON_STOCKTRANSFER_PDF", $arrval, getDolGlobalString('BARCODE_ON_STOCKTRANSFER_PDF'));
799 }
800 print '</td></tr>';
801
802 print '</table>';
803 print '</div>';
804
805 print '<br>';
806}
807
808print '<br><div class="center">';
809print '<input class="button button-save" type="submit" name="save" value="'.$langs->trans("Save").'">';
810print '</div>';
811
812print '</form>';
813
814
815// End of page
816llxFooter();
817$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.
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
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
Class to generate html code for admin pages.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
Class to help generate other html components Only common components are here.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:66
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $keyforsourcefile='addedfile', $upload_dir='', $mode=0)
Check validity of a file upload from an GUI page, and move it to its final destination.
dol_sanitizePathName($str, $newstr='_', $unaccent=0, $allowdash=0)
Clean a string to use it as a path name.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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.
Definition html.lib.php:542
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
pdf_admin_prepare_head()
Return array head with list of tabs to view object information.
Definition pdf.lib.php:49
getMaxFileSizeArray()
Return the max allowed for file upload.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.