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';
52$langs->loadLangs(array(
'admin',
'bills',
'companies',
'languages',
'members',
'other',
'products',
'propal',
'receptions',
'stocks',
'trips',
'orders',
'sendings'));
58$action =
GETPOST(
'action',
'aZ09');
59$modulepart =
GETPOST(
'modulepart',
'aZ09');
63if ($modulepart ==
'propal') {
64 $diroffile =
$conf->propal->dir_output;
65 $varname =
'MAIN_INFO_PROPAL_TERMSOFSALE';
67if ($modulepart ==
'order') {
68 $diroffile =
$conf->order->dir_output;
69 $varname =
'MAIN_INFO_ORDER_TERMSOFSALE';
71if ($modulepart ==
'contrat') {
72 $diroffile =
$conf->contract->dir_output;
73 $varname =
'MAIN_INFO_CONTRACT_TERMSOFSALE';
75if ($modulepart ==
'invoice') {
76 $diroffile =
$conf->invoice->dir_output;
77 $varname =
'MAIN_INFO_INVOICE_TERMSOFSALE';
85if ($action ==
'update') {
86 if (GETPOSTISSET(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
89 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
92 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
95 if (GETPOSTISSET(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
98 if (GETPOSTISSET(
'PROPOSAL_SHOW_SHIPPING_ADDRESS')) {
101 if (GETPOSTISSET(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS')) {
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);
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);
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);
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);
117 if (GETPOSTISSET(
'MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
120 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL')) {
123 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
126 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_CONTRACT')) {
129 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
132 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
134 if (
GETPOSTINT(
'INVOICE_ADD_ZATCA_QR_CODE') == 1) {
138 if (GETPOSTISSET(
'INVOICE_ADD_EPC_QR_CODE')) {
140 if (
GETPOSTINT(
'INVOICE_ADD_EPC_QR_CODE') == 1) {
144 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
146 if (
GETPOST(
'INVOICE_ADD_SWISS_QR_CODE',
'alpha') !=
'0') {
150 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
153 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
157 if (GETPOSTISSET(
'PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
161 if (GETPOSTISSET(
'PDF_INVOICE_SHOW_BALANCE_SUMMARY')) {
165 if (GETPOSTISSET(
'INVOICE_HIDE_LINKED_OBJECT')) {
168 if (GETPOSTISSET(
'BARCODE_ON_SHIPPING_PDF')) {
171 if (GETPOSTISSET(
'BARCODE_ON_RECEPTION_PDF')) {
174 if (GETPOSTISSET(
'BARCODE_ON_STOCKTRANSFER_PDF')) {
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"])) {
182 $langs->load(
"errors");
186 case 'MAIN_INFO_PROPAL_TERMSOFSALE':
187 $diroffile =
$conf->propal->dir_output;
189 case 'MAIN_INFO_ORDER_TERMSOFSALE':
190 $diroffile =
$conf->order->dir_output;
192 case 'MAIN_INFO_CONTRACT_TERMSOFSALE':
193 $diroffile =
$conf->contract->dir_output;
195 case 'MAIN_INFO_INVOICE_TERMSOFSALE':
196 $diroffile =
$conf->invoice->dir_output;
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) {
213 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
217if ($action ==
'removetermsofsale') {
218 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
221 if ($filename !=
'') {
233$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
234llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf_other');
248print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
253$tooltipconcatpdf = ($maxfilesizearray[
'maxmin'] > 0) ? $langs->trans(
'MaxSize').
' : '.$maxfilesizearray[
'maxmin'].
' '.$langs->trans(
'Kb') :
'';
255$documenturl =
getDolGlobalString(
'DOL_URL_ROOT_DOCUMENT_PHP', DOL_URL_ROOT.
'/document.php');
258print
'<form enctype="multipart/form-data" method="post" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
259print
'<input type="hidden" name="token" value="'.newToken().
'">';
260print
'<input type="hidden" name="action" value="update">';
263 print
'<div id="proposal" class="anchorundermenu"></div>';
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>';
283 print
'<tr class="oddeven"><td>';
284 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
286 if (
$conf->use_javascript_ajax) {
287 print ajax_constantonoff(
'PDF_PROPAL_SHOW_PRICE_INCL_TAX');
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'));
294 print
'<tr class="oddeven"><td>';
295 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
297 if (
$conf->use_javascript_ajax) {
298 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
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'));
306 print
'<tr class="oddeven"><td>';
307 print $form->textwithpicto($langs->trans(
"PROPOSAL_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"PROPOSAL_SHOW_SHIPPING_ADDRESSMore"));
309 if (
$conf->use_javascript_ajax) {
310 print ajax_constantonoff(
'PROPOSAL_SHOW_SHIPPING_ADDRESS');
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'));
318 print
'<tr class="oddeven"><td>';
319 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL"), $tooltipconcatpdf);
321 if (
$conf->use_javascript_ajax) {
322 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL', array(),
null, 0, 0, 1);
324 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
325 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL'));
329 $modulepart =
'propal';
330 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
331 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_PROPAL_TERMSOFSALE" id="MAIN_INFO_PROPAL_TERMSOFSALE" accept="application/pdf">';
335 if (file_exists(
$conf->propal->dir_output.
'/'.$termofsale)) {
338 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>';
339 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>';
353 print
'<div id="order" class="anchorundermenu"></div>';
355 $langs->load(
"orders");
358 print
'<div class="div-table-responsive-no-min">';
359 print
'<table summary="more" class="noborder centpercent">';
361 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
363 print
'<tr class="oddeven"><td>';
364 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
366 if (
$conf->use_javascript_ajax) {
367 print ajax_constantonoff(
'PDF_ORDER_SHOW_PRICE_INCL_TAX');
369 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
370 print $form->selectarray(
"PDF_ORDER_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_ORDER_SHOW_PRICE_INCL_TAX'));
374 print
'<tr class="oddeven"><td>';
375 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
377 if (
$conf->use_javascript_ajax) {
378 print ajax_constantonoff(
'MAIN_GENERATE_ORDERS_WITH_PICTURE');
380 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
381 print $form->selectarray(
"MAIN_GENERATE_ORDERS_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_ORDERS_WITH_PICTURE'));
385 print
'<tr class="oddeven"><td>';
386 print $form->textwithpicto($langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
388 if (
$conf->use_javascript_ajax) {
389 print ajax_constantonoff(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS');
391 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
392 print $form->selectarray(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval,
getDolGlobalString(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS'));
397 print
'<tr class="oddeven"><td>';
398 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER"),
'');
400 if (
$conf->use_javascript_ajax) {
401 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER', array(),
null, 0, 0, 1);
403 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
404 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER'));
408 $modulepart =
'order';
409 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
410 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_ORDER_TERMSOFSALE" id="MAIN_INFO_ORDER_TERMSOFSALE" accept="application/pdf">';
414 if (file_exists(
$conf->order->dir_output.
'/'.$termofsale)) {
417 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>';
418 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>';
433 print
'<div id="contrat" class="anchorundermenu"></div>';
436 print
'<div class="div-table-responsive-no-min">';
437 print
'<table summary="more" class="noborder centpercent">';
438 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
441 print
'<tr class="oddeven"><td>';
442 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_CONTRACT"), $tooltipconcatpdf);
444 if (
$conf->use_javascript_ajax) {
445 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_CONTRACT', array(),
null, 0, 0, 1);
447 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
448 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_CONTRACT", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_CONTRACT'));
452 $modulepart =
'contrat';
453 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
454 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_CONTRACT_TERMSOFSALE" id="MAIN_INFO_CONTRACT_TERMSOFSALE" accept="application/pdf">';
458 if (file_exists(
$conf->contract->dir_output.
'/'.$termofsale)) {
461 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>';
462 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>';
477 print
'<div id="invoice" class="anchorundermenu"></div>';
481 print
'<div class="div-table-responsive-no-min">';
482 print
'<table summary="more" class="noborder centpercent">';
483 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
485 print
'<tr class="oddeven"><td>';
486 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
488 if (
$conf->use_javascript_ajax) {
489 print ajax_constantonoff(
'PDF_INVOICE_SHOW_PRICE_INCL_TAX');
491 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
492 print $form->selectarray(
"PDF_INVOICE_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_INVOICE_SHOW_PRICE_INCL_TAX'));
496 print
'<tr class="oddeven"><td>';
497 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
499 if (
$conf->use_javascript_ajax) {
500 print ajax_constantonoff(
'MAIN_GENERATE_INVOICES_WITH_PICTURE');
502 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
503 print $form->selectarray(
"MAIN_GENERATE_INVOICES_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_INVOICES_WITH_PICTURE'));
507 print
'<tr class="oddeven"><td>';
508 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
510 if (
$conf->use_javascript_ajax) {
511 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
513 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
514 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval,
getDolGlobalString(
'INVOICE_SHOW_SHIPPING_ADDRESS'));
519 print
'<tr class="oddeven"><td>';
520 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE"),
'');
522 if (
$conf->use_javascript_ajax) {
523 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE', array(),
null, 0, 0, 1);
525 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
526 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE'));
530 $modulepart =
'invoice';
531 print
'<div class="inline-block nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
532 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_INVOICE_TERMSOFSALE" id="MAIN_INFO_INVOICE_TERMSOFSALE" accept="application/pdf">';
536 if (file_exists(
$conf->invoice->dir_output.
'/'.$termofsale)) {
539 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>';
540 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>';
548 print
'<tr class="oddeven"><td>';
549 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
551 if (
$conf->use_javascript_ajax) {
552 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
554 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
555 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
559 print
'<tr class="oddeven"><td>';
560 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_EPC_QR_CODE"), $langs->trans(
"INVOICE_ADD_EPC_QR_CODEMore"));
562 if (
$conf->use_javascript_ajax) {
563 print ajax_constantonoff(
'INVOICE_ADD_EPC_QR_CODE');
565 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
566 print $form->selectarray(
"INVOICE_ADD_EPC_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_EPC_QR_CODE'));
570 print
'<tr class="oddeven"><td>';
572 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
574 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
577 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
579 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
581 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
586 print
'<tr class="oddeven"><td>';
587 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
589 $arrval = array(
'0'=>$langs->trans(
"No"),
590 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
591 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
593 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval,
getDolGlobalString(
'INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
596 print
'<tr class="oddeven"><td>';
597 print $form->textwithpicto($langs->trans(
"PDF_INVOICE_SHOW_VAT_ANALYSIS"),
'');
599 if (
$conf->use_javascript_ajax) {
600 print ajax_constantonoff(
'PDF_INVOICE_SHOW_VAT_ANALYSIS');
602 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
603 print $form->selectarray(
"PDF_INVOICE_SHOW_VAT_ANALYSIS", $arrval,
getDolGlobalInt(
'PDF_INVOICE_SHOW_VAT_ANALYSIS'));
608 print
'<tr class="oddeven"><td>';
609 print $form->textwithpicto($langs->trans(
"PDF_INVOICE_SHOW_BALANCE_SUMMARY"),
'');
611 if (
$conf->use_javascript_ajax) {
612 print ajax_constantonoff(
'PDF_INVOICE_SHOW_BALANCE_SUMMARY');
614 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
615 print $form->selectarray(
"PDF_INVOICE_SHOW_BALANCE_SUMMARY", $arrval,
getDolGlobalInt(
'PDF_INVOICE_SHOW_BALANCE_SUMMARY'));
631 print
'<tr class="oddeven"><td>';
632 print $form->textwithpicto($langs->trans(
"INVOICE_HIDE_LINKED_OBJECT"), $langs->trans(
"INVOICE_HIDE_LINKED_OBJECTMore"));
634 if (
$conf->use_javascript_ajax) {
635 print ajax_constantonoff(
'INVOICE_HIDE_LINKED_OBJECT');
637 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
638 print $form->selectarray(
"INVOICE_HIDE_LINKED_OBJECT", $arrval,
getDolGlobalString(
'INVOICE_HIDE_LINKED_OBJECT'));
650 print
'<div id="supplier_proposal"></div>';
652 $langs->load(
"supplier_proposal");
653 print
load_fiche_titre($langs->trans(
"SupplierProposal"),
'',
'supplier_proposal');
655 print
'<div class="div-table-responsive-no-min">';
656 print
'<table summary="more" class="noborder centpercent">';
657 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
659 print
'<tr class="oddeven"><td>';
660 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'');
662 if (
$conf->use_javascript_ajax) {
663 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
665 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
666 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE'));
670 print
'<tr class="oddeven"><td>';
671 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'');
673 if (
$conf->use_javascript_ajax) {
674 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
676 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
677 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN'));
689 print
'<div id="supplier_order"></div>';
691 $langs->load(
"supplier_order");
692 print
load_fiche_titre($langs->trans(
"SupplierOrder"),
'',
'supplier_proposal');
694 print
'<div class="div-table-responsive-no-min">';
695 print
'<table summary="more" class="noborder centpercent">';
696 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
698 print
'<tr class="oddeven"><td>';
699 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'');
701 if (
$conf->use_javascript_ajax) {
702 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
704 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
705 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE'));
709 print
'<tr class="oddeven"><td>';
710 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'');
712 if (
$conf->use_javascript_ajax) {
713 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
715 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
716 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN'));
727 print
'<div id="shipping"></div>';
731 print
'<div class="div-table-responsive-no-min">';
732 print
'<table summary="more" class="noborder centpercent">';
733 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
735 print
'<tr class="oddeven"><td>';
736 print $langs->trans(
"BARCODE_ON_SHIPPING_PDF");
738 if (
$conf->use_javascript_ajax) {
739 print ajax_constantonoff(
'BARCODE_ON_SHIPPING_PDF');
741 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
742 print $form->selectarray(
"BARCODE_ON_SHIPPING_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_SHIPPING_PDF'));
752 print
'<div id="reception"></div>';
756 print
'<div class="div-table-responsive-no-min">';
757 print
'<table summary="more" class="noborder centpercent">';
758 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
760 print
'<tr class="oddeven"><td>';
761 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
763 if (
$conf->use_javascript_ajax) {
764 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
766 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
767 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval,
getDolGlobalString(
'RECEPTION_PDF_HIDE_ORDERED'));
771 print
'<tr class="oddeven"><td>';
772 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
774 if (
$conf->use_javascript_ajax) {
775 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
777 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
778 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval,
getDolGlobalString(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
782 print
'<tr class="oddeven"><td>';
783 print $langs->trans(
"BARCODE_ON_RECEPTION_PDF");
785 if (
$conf->use_javascript_ajax) {
786 print ajax_constantonoff(
'BARCODE_ON_RECEPTION_PDF');
788 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
789 print $form->selectarray(
"BARCODE_ON_RECEPTION_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_RECEPTION_PDF'));
799 print
'<div id="stocktransfer"></div>';
803 print
'<div class="div-table-responsive-no-min">';
804 print
'<table summary="more" class="noborder centpercent">';
805 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
807 print
'<tr class="oddeven"><td>';
808 print $langs->trans(
"BARCODE_ON_STOCKTRANSFER_PDF");
810 if (
$conf->use_javascript_ajax) {
811 print ajax_constantonoff(
'BARCODE_ON_STOCKTRANSFER_PDF');
813 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
814 print $form->selectarray(
"BARCODE_ON_STOCKTRANSFER_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_STOCKTRANSFER_PDF'));
824print
'<br><div class="center">';
825print
'<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.
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.