32require
'../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
51$langs->loadLangs(array(
'admin',
'bills',
'companies',
'languages',
'members',
'other',
'products',
'propal',
'receptions',
'stocks',
'trips',
'orders',
'sendings'));
57$action =
GETPOST(
'action',
'aZ09');
58$modulepart =
GETPOST(
'modulepart',
'aZ09');
62if ($modulepart ==
'propal') {
63 $diroffile = $conf->propal->dir_output;
64 $varname =
'MAIN_INFO_PROPAL_TERMSOFSALE';
66if ($modulepart ==
'order') {
67 $diroffile = $conf->order->dir_output;
68 $varname =
'MAIN_INFO_ORDER_TERMSOFSALE';
70if ($modulepart ==
'invoice') {
71 $diroffile = $conf->invoice->dir_output;
72 $varname =
'MAIN_INFO_INVOICE_TERMSOFSALE';
80if ($action ==
'update') {
81 if (GETPOSTISSET(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
82 dolibarr_set_const($db,
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING",
GETPOST(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'chaine', 0,
'', $conf->entity);
84 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
85 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTTERM",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTTERM"),
'chaine', 0,
'', $conf->entity);
87 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
88 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTMODE",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTMODE"),
'chaine', 0,
'', $conf->entity);
90 if (GETPOSTISSET(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
91 dolibarr_set_const($db,
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE",
GETPOST(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"),
'chaine', 0,
'', $conf->entity);
93 if (GETPOSTISSET(
'PROPOSAL_SHOW_SHIPPING_ADDRESS')) {
96 if (GETPOSTISSET(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS')) {
97 dolibarr_set_const($db,
"SALES_ORDER_SHOW_SHIPPING_ADDRESS",
GETPOSTINT(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS"),
'chaine', 0,
'', $conf->entity);
100 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
101 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);
103 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
104 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);
106 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
107 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);
109 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
110 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);
112 if (GETPOSTISSET(
'MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
113 dolibarr_set_const($db,
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH",
GETPOSTINT(
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH"),
'chaine', 0,
'', $conf->entity);
115 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL')) {
116 dolibarr_set_const($db,
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL",
GETPOST(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL",
'int'),
'chaine', 0,
'', $conf->entity);
118 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
119 dolibarr_set_const($db,
"MAIN_PDF_ADD_TERMSOFSALE_ORDER",
GETPOST(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER",
'int'),
'chaine', 0,
'', $conf->entity);
121 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
122 dolibarr_set_const($db,
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE",
GETPOST(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE",
'int'),
'chaine', 0,
'', $conf->entity);
124 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
126 if (
GETPOSTINT(
'INVOICE_ADD_ZATCA_QR_CODE') == 1) {
130 if (GETPOSTISSET(
'INVOICE_ADD_EPC_QR_CODE')) {
131 dolibarr_set_const($db,
"INVOICE_ADD_EPC_QR_CODE",
GETPOST(
"INVOICE_ADD_EPC_QR_CODE",
'int'),
'chaine', 0,
'', $conf->entity);
132 if (
GETPOSTINT(
'INVOICE_ADD_EPC_QR_CODE') == 1) {
136 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
137 dolibarr_set_const($db,
"INVOICE_ADD_SWISS_QR_CODE",
GETPOST(
"INVOICE_ADD_SWISS_QR_CODE",
'alpha'),
'chaine', 0,
'', $conf->entity);
138 if (
GETPOST(
'INVOICE_ADD_SWISS_QR_CODE',
'alpha') !=
'0') {
142 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
145 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
149 if (GETPOSTISSET(
'PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
153 if (GETPOSTISSET(
'PDF_INVOICE_SHOW_BALANCE_SUMMARY')) {
154 dolibarr_set_const($db,
"PDF_INVOICE_SHOW_BALANCE_SUMMARY",
GETPOSTINT(
"PDF_INVOICE_SHOW_BALANCE_SUMMARY"),
'chaine', 0,
'', $conf->entity);
157 if (GETPOSTISSET(
'INVOICE_HIDE_LINKED_OBJECT')) {
160 if (GETPOSTISSET(
'BARCODE_ON_SHIPPING_PDF')) {
163 if (GETPOSTISSET(
'BARCODE_ON_RECEPTION_PDF')) {
166 if (GETPOSTISSET(
'BARCODE_ON_STOCKTRANSFER_PDF')) {
170 foreach (array(
'MAIN_INFO_PROPAL_TERMSOFSALE',
'MAIN_INFO_ORDER_TERMSOFSALE',
'MAIN_INFO_INVOICE_TERMSOFSALE') as $varname) {
171 if (isset($_FILES[$varname]) && $_FILES[$varname][
"name"]) {
172 if (!preg_match(
'/(\.pdf)$/i', $_FILES[$varname][
"name"])) {
173 $langs->load(
"errors");
176 if ($varname ==
'MAIN_INFO_PROPAL_TERMSOFSALE') {
177 $diroffile = $conf->propal->dir_output;
178 } elseif ($varname ==
'MAIN_INFO_ORDER_TERMSOFSALE') {
179 $diroffile = $conf->order->dir_output;
180 } elseif ($varname ==
'MAIN_INFO_INVOICE_TERMSOFSALE') {
181 $diroffile = $conf->invoice->dir_output;
184 $dirforterms = $diroffile.
'/';
185 $original_file = $_FILES[$varname][
"name"];
186 $result =
dol_move_uploaded_file($_FILES[$varname][
"tmp_name"], $dirforterms.$original_file, 1, 0, $_FILES[$varname][
'error']);
187 if ((
int) $result > 0) {
197 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
201if ($action ==
'removetermsofsale') {
202 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
205 if ($filename !=
'') {
217$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
218llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf_other');
220$form =
new Form($db);
232print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
237$tooltipconcatpdf = ($maxfilesizearray[
'maxmin'] > 0) ? $langs->trans(
'MaxSize').
' : '.$maxfilesizearray[
'maxmin'].
' '.$langs->trans(
'Kb') :
'';
239$documenturl =
getDolGlobalString(
'DOL_URL_ROOT_DOCUMENT_PHP', DOL_URL_ROOT.
'/document.php');
242print
'<form enctype="multipart/form-data" method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
243print
'<input type="hidden" name="token" value="'.newToken().
'">';
244print
'<input type="hidden" name="action" value="update">';
247 print
'<div id="proposal" class="undertopmenu"></div>';
250 print
'<div class="div-table-responsive-no-min">';
251 print
'<table summary="more" class="noborder centpercent">';
252 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
267 print
'<tr class="oddeven"><td>';
268 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
270 if ($conf->use_javascript_ajax) {
271 print ajax_constantonoff(
'PDF_PROPAL_SHOW_PRICE_INCL_TAX');
273 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
274 print $form->selectarray(
"PDF_PROPAL_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_PROPAL_SHOW_PRICE_INCL_TAX'));
278 print
'<tr class="oddeven"><td>';
279 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
281 if ($conf->use_javascript_ajax) {
282 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
284 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
285 print $form->selectarray(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE'));
290 print
'<tr class="oddeven"><td>';
291 print $form->textwithpicto($langs->trans(
"PROPOSAL_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"PROPOSAL_SHOW_SHIPPING_ADDRESSMore"));
293 if ($conf->use_javascript_ajax) {
294 print ajax_constantonoff(
'PROPOSAL_SHOW_SHIPPING_ADDRESS');
296 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
297 print $form->selectarray(
"PROPOSAL_SHOW_SHIPPING_ADDRESS", $arrval,
getDolGlobalString(
'PROPOSAL_SHOW_SHIPPING_ADDRESS'));
302 print
'<tr class="oddeven"><td>';
303 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL"), $tooltipconcatpdf);
305 if ($conf->use_javascript_ajax) {
306 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL', array(),
null, 0, 0, 1);
308 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
309 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL'));
313 $modulepart =
'propal';
314 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
315 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_PROPAL_TERMSOFSALE" id="MAIN_INFO_PROPAL_TERMSOFSALE" accept="application/pdf">';
319 if (file_exists($conf->propal->dir_output.
'/'.$termofsale)) {
320 $file =
dol_dir_list($conf->propal->dir_output,
'files', 0, $termofsale);
322 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>';
323 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>';
337 print
'<div id="order" class="undertopmenu"></div>';
339 $langs->load(
"orders");
342 print
'<div class="div-table-responsive-no-min">';
343 print
'<table summary="more" class="noborder centpercent">';
345 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
347 print
'<tr class="oddeven"><td>';
348 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
350 if ($conf->use_javascript_ajax) {
351 print ajax_constantonoff(
'PDF_ORDER_SHOW_PRICE_INCL_TAX');
353 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
354 print $form->selectarray(
"PDF_ORDER_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_ORDER_SHOW_PRICE_INCL_TAX'));
358 print
'<tr class="oddeven"><td>';
359 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
361 if ($conf->use_javascript_ajax) {
362 print ajax_constantonoff(
'MAIN_GENERATE_ORDERS_WITH_PICTURE');
364 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
365 print $form->selectarray(
"MAIN_GENERATE_ORDERS_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_ORDERS_WITH_PICTURE'));
369 print
'<tr class="oddeven"><td>';
370 print $form->textwithpicto($langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
372 if ($conf->use_javascript_ajax) {
373 print ajax_constantonoff(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS');
375 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
376 print $form->selectarray(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval,
getDolGlobalString(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS'));
381 print
'<tr class="oddeven"><td>';
382 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER"),
'');
384 if ($conf->use_javascript_ajax) {
385 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER', array(),
null, 0, 0, 1);
387 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
388 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER'));
392 $modulepart =
'order';
393 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
394 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_ORDER_TERMSOFSALE" id="MAIN_INFO_ORDER_TERMSOFSALE" accept="application/pdf">';
398 if (file_exists($conf->order->dir_output.
'/'.$termofsale)) {
399 $file =
dol_dir_list($conf->order->dir_output,
'files', 0, $termofsale);
401 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>';
402 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>';
418 print
'<div id="invoice" class="undertopmenu"></div>';
422 print
'<div class="div-table-responsive-no-min">';
423 print
'<table summary="more" class="noborder centpercent">';
424 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
426 print
'<tr class="oddeven"><td>';
427 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
429 if ($conf->use_javascript_ajax) {
430 print ajax_constantonoff(
'PDF_INVOICE_SHOW_PRICE_INCL_TAX');
432 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
433 print $form->selectarray(
"PDF_INVOICE_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_INVOICE_SHOW_PRICE_INCL_TAX'));
437 print
'<tr class="oddeven"><td>';
438 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
440 if ($conf->use_javascript_ajax) {
441 print ajax_constantonoff(
'MAIN_GENERATE_INVOICES_WITH_PICTURE');
443 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
444 print $form->selectarray(
"MAIN_GENERATE_INVOICES_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_INVOICES_WITH_PICTURE'));
448 print
'<tr class="oddeven"><td>';
449 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
451 if ($conf->use_javascript_ajax) {
452 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
454 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
455 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval,
getDolGlobalString(
'INVOICE_SHOW_SHIPPING_ADDRESS'));
460 print
'<tr class="oddeven"><td>';
461 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE"),
'');
463 if ($conf->use_javascript_ajax) {
464 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE', array(),
null, 0, 0, 1);
466 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
467 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE'));
471 $modulepart =
'invoice';
472 print
'<div class="inline-block nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
473 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_INVOICE_TERMSOFSALE" id="MAIN_INFO_INVOICE_TERMSOFSALE" accept="application/pdf">';
477 if (file_exists($conf->invoice->dir_output.
'/'.$termofsale)) {
478 $file =
dol_dir_list($conf->invoice->dir_output,
'files', 0, $termofsale);
480 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>';
481 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>';
489 print
'<tr class="oddeven"><td>';
490 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
492 if ($conf->use_javascript_ajax) {
493 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
495 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
496 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
500 print
'<tr class="oddeven"><td>';
501 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_EPC_QR_CODE"), $langs->trans(
"INVOICE_ADD_EPC_QR_CODEMore"));
503 if ($conf->use_javascript_ajax) {
504 print ajax_constantonoff(
'INVOICE_ADD_EPC_QR_CODE');
506 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
507 print $form->selectarray(
"INVOICE_ADD_EPC_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_EPC_QR_CODE'));
511 print
'<tr class="oddeven"><td>';
513 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
515 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
518 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
520 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
522 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
527 print
'<tr class="oddeven"><td>';
528 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
530 $arrval = array(
'0'=>$langs->trans(
"No"),
531 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
532 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
534 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval,
getDolGlobalString(
'INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
537 print
'<tr class="oddeven"><td>';
538 print $form->textwithpicto($langs->trans(
"PDF_INVOICE_SHOW_VAT_ANALYSIS"),
'');
540 if ($conf->use_javascript_ajax) {
541 print ajax_constantonoff(
'PDF_INVOICE_SHOW_VAT_ANALYSIS');
543 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
544 print $form->selectarray(
"PDF_INVOICE_SHOW_VAT_ANALYSIS", $arrval,
getDolGlobalInt(
'PDF_INVOICE_SHOW_VAT_ANALYSIS'));
549 print
'<tr class="oddeven"><td>';
550 print $form->textwithpicto($langs->trans(
"PDF_INVOICE_SHOW_BALANCE_SUMMARY"),
'');
552 if ($conf->use_javascript_ajax) {
553 print ajax_constantonoff(
'PDF_INVOICE_SHOW_BALANCE_SUMMARY');
555 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
556 print $form->selectarray(
"PDF_INVOICE_SHOW_BALANCE_SUMMARY", $arrval,
getDolGlobalInt(
'PDF_INVOICE_SHOW_BALANCE_SUMMARY'));
572 print
'<tr class="oddeven"><td>';
573 print $form->textwithpicto($langs->trans(
"INVOICE_HIDE_LINKED_OBJECT"), $langs->trans(
"INVOICE_HIDE_LINKED_OBJECTMore"));
575 if ($conf->use_javascript_ajax) {
576 print ajax_constantonoff(
'INVOICE_HIDE_LINKED_OBJECT');
578 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
579 print $form->selectarray(
"INVOICE_HIDE_LINKED_OBJECT", $arrval,
getDolGlobalString(
'INVOICE_HIDE_LINKED_OBJECT'));
591 print
'<div id="supplier_proposal"></div>';
593 $langs->load(
"supplier_proposal");
594 print
load_fiche_titre($langs->trans(
"SupplierProposal"),
'',
'supplier_proposal');
596 print
'<div class="div-table-responsive-no-min">';
597 print
'<table summary="more" class="noborder centpercent">';
598 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
600 print
'<tr class="oddeven"><td>';
601 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'');
603 if ($conf->use_javascript_ajax) {
604 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
606 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
607 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE'));
611 print
'<tr class="oddeven"><td>';
612 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'');
614 if ($conf->use_javascript_ajax) {
615 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
617 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
618 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN'));
630 print
'<div id="supplier_order"></div>';
632 $langs->load(
"supplier_order");
633 print
load_fiche_titre($langs->trans(
"SupplierOrder"),
'',
'supplier_proposal');
635 print
'<div class="div-table-responsive-no-min">';
636 print
'<table summary="more" class="noborder centpercent">';
637 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
639 print
'<tr class="oddeven"><td>';
640 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'');
642 if ($conf->use_javascript_ajax) {
643 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
645 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
646 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE'));
650 print
'<tr class="oddeven"><td>';
651 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'');
653 if ($conf->use_javascript_ajax) {
654 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
656 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
657 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN'));
668 print
'<div id="shipping"></div>';
672 print
'<div class="div-table-responsive-no-min">';
673 print
'<table summary="more" class="noborder centpercent">';
674 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
676 print
'<tr class="oddeven"><td>';
677 print $langs->trans(
"BARCODE_ON_SHIPPING_PDF");
679 if ($conf->use_javascript_ajax) {
680 print ajax_constantonoff(
'BARCODE_ON_SHIPPING_PDF');
682 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
683 print $form->selectarray(
"BARCODE_ON_SHIPPING_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_SHIPPING_PDF'));
693 print
'<div id="reception"></div>';
697 print
'<div class="div-table-responsive-no-min">';
698 print
'<table summary="more" class="noborder centpercent">';
699 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
701 print
'<tr class="oddeven"><td>';
702 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
704 if ($conf->use_javascript_ajax) {
705 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
707 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
708 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval,
getDolGlobalString(
'RECEPTION_PDF_HIDE_ORDERED'));
712 print
'<tr class="oddeven"><td>';
713 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
715 if ($conf->use_javascript_ajax) {
716 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
718 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
719 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval,
getDolGlobalString(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
723 print
'<tr class="oddeven"><td>';
724 print $langs->trans(
"BARCODE_ON_RECEPTION_PDF");
726 if ($conf->use_javascript_ajax) {
727 print ajax_constantonoff(
'BARCODE_ON_RECEPTION_PDF');
729 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
730 print $form->selectarray(
"BARCODE_ON_RECEPTION_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_RECEPTION_PDF'));
740 print
'<div id="stocktransfer"></div>';
744 print
'<div class="div-table-responsive-no-min">';
745 print
'<table summary="more" class="noborder centpercent">';
746 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
748 print
'<tr class="oddeven"><td>';
749 print $langs->trans(
"BARCODE_ON_STOCKTRANSFER_PDF");
751 if ($conf->use_javascript_ajax) {
752 print ajax_constantonoff(
'BARCODE_ON_STOCKTRANSFER_PDF');
754 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
755 print $form->selectarray(
"BARCODE_ON_STOCKTRANSFER_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_STOCKTRANSFER_PDF'));
765print
'<br><div class="center">';
766print
'<input class="button button-save" type="submit" name="save" value="'.$langs->trans(
"Save").
'">';
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.
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.
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.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
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, $morecssdiv='')
Show tabs of a record.
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)
Return value of a param into GET or POST supervariable.
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.
pdf_admin_prepare_head()
Return array head with list of tabs to view object information.
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.