30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
39$langs->loadLangs(array(
'admin',
'companies',
'languages',
'members',
'other',
'products',
'stocks',
'trips'));
45$action =
GETPOST(
'action',
'aZ09');
46$cancel =
GETPOST(
'cancel',
'alpha');
57if ($action ==
'update') {
58 if (GETPOSTISSET(
'MAIN_PDF_FORMAT')) {
62 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_LEFT')) {
65 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_RIGHT')) {
68 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_TOP')) {
71 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_BOTTOM')) {
75 if (GETPOSTISSET(
'MAIN_PROFID1_IN_ADDRESS')) {
78 if (GETPOSTISSET(
'MAIN_PROFID2_IN_ADDRESS')) {
81 if (GETPOSTISSET(
'MAIN_PROFID3_IN_ADDRESS')) {
84 if (GETPOSTISSET(
'MAIN_PROFID4_IN_ADDRESS')) {
87 if (GETPOSTISSET(
'MAIN_PROFID5_IN_ADDRESS')) {
90 if (GETPOSTISSET(
'MAIN_PROFID6_IN_ADDRESS')) {
94 if (GETPOSTISSET(
'MAIN_PDF_NO_SENDER_FRAME')) {
97 if (GETPOSTISSET(
'MAIN_PDF_NO_RECIPENT_FRAME')) {
98 dolibarr_set_const($db,
"MAIN_PDF_NO_RECIPENT_FRAME",
GETPOST(
"MAIN_PDF_NO_RECIPENT_FRAME"),
'chaine', 0,
'', $conf->entity);
105 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) {
106 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"),
'chaine', 0,
'', $conf->entity);
109 if (GETPOSTISSET(
'MAIN_TVAINTRA_NOT_IN_ADDRESS')) {
110 dolibarr_set_const($db,
"MAIN_TVAINTRA_NOT_IN_ADDRESS",
GETPOST(
"MAIN_TVAINTRA_NOT_IN_ADDRESS"),
'chaine', 0,
'', $conf->entity);
113 if (isModEnabled(
'project')) {
114 if (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'no') {
117 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectref') {
120 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectlabel') {
122 dolibarr_set_const($db,
"PDF_SHOW_PROJECT_TITLE",
GETPOST(
"PDF_SHOW_PROJECT_REF_OR_LABEL"),
'chaine', 0,
'', $conf->entity);
126 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS')) {
127 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"),
'chaine', 0,
'', $conf->entity);
129 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC')) {
130 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_DESC",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_DESC"),
'chaine', 0,
'', $conf->entity);
132 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF')) {
133 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_REF",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_REF"),
'chaine', 0,
'', $conf->entity);
136 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE')) {
137 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE"),
'chaine', 0,
'', $conf->entity);
140 if (GETPOSTISSET(
'MAIN_DOCUMENTS_LOGO_HEIGHT')) {
143 if (GETPOSTISSET(
'MAIN_INVERT_SENDER_RECIPIENT')) {
144 dolibarr_set_const($db,
"MAIN_INVERT_SENDER_RECIPIENT",
GETPOST(
"MAIN_INVERT_SENDER_RECIPIENT"),
'chaine', 0,
'', $conf->entity);
146 if (GETPOSTISSET(
'MAIN_PDF_USE_ISO_LOCATION')) {
147 dolibarr_set_const($db,
"MAIN_PDF_USE_ISO_LOCATION",
GETPOST(
"MAIN_PDF_USE_ISO_LOCATION"),
'chaine', 0,
'', $conf->entity);
149 if (GETPOSTISSET(
'MAIN_PDF_NO_CUSTOMER_CODE')) {
150 dolibarr_set_const($db,
"MAIN_PDF_NO_CUSTOMER_CODE",
GETPOST(
"MAIN_PDF_NO_CUSTOMER_CODE"),
'chaine', 0,
'', $conf->entity);
153 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
154 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"),
'chaine', 0,
'', $conf->entity);
157 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX')) {
158 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_SECOND_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_SECOND_TAX"),
'chaine', 0,
'', $conf->entity);
160 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX')) {
161 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_THIRD_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_THIRD_TAX"),
'chaine', 0,
'', $conf->entity);
164 if (GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE')) {
165 dolibarr_set_const($db,
"PDF_USE_ALSO_LANGUAGE_CODE",
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE',
'alpha'),
'chaine', 0,
'', $conf->entity);
167 if (GETPOSTISSET(
'SHOW_SUBPRODUCT_REF_IN_PDF')) {
168 dolibarr_set_const($db,
"SHOW_SUBPRODUCT_REF_IN_PDF",
GETPOST(
'SHOW_SUBPRODUCT_REF_IN_PDF',
'alpha'),
'chaine', 0,
'', $conf->entity);
171 if (GETPOSTISSET(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT')) {
172 dolibarr_set_const($db,
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT",
GETPOST(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
'alpha'),
'chaine', 0,
'', $conf->entity);
175 if (GETPOSTISSET(
'DOC_SHOW_FIRST_SALES_REP')) {
176 dolibarr_set_const($db,
"DOC_SHOW_FIRST_SALES_REP",
GETPOST(
'DOC_SHOW_FIRST_SALES_REP',
'alpha'),
'chaine', 0,
'', $conf->entity);
179 if (GETPOSTISSET(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) {
180 dolibarr_set_const($db,
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME",
GETPOST(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME',
'alpha'),
'chaine', 0,
'', $conf->entity);
182 if (GETPOSTISSET(
'PDF_USE_A')) {
186 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_LABEL')) {
187 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_LABEL",
GETPOST(
'PDF_BOLD_PRODUCT_LABEL',
'alpha'),
'chaine', 0,
'', $conf->entity);
189 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD')) {
190 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_REF_AND_PERIOD",
GETPOST(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
'alpha'),
'chaine', 0,
'', $conf->entity);
195 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
205$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
206llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf');
208$form =
new Form($db);
212$arraydetailsforpdffoot = array(
213 0 => $langs->transnoentitiesnoconv(
'NoDetails'),
214 1 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfo'),
215 2 => $langs->transnoentitiesnoconv(
'DisplayCompanyManagers'),
216 3 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfoAndManagers')
219$arraylistofpdfformat = array(
220 0 => $langs->transnoentitiesnoconv(
'PDF 1.7'),
221 1 => $langs->transnoentitiesnoconv(
'PDF/A-1b'),
222 3 => $langs->transnoentitiesnoconv(
'PDF/A-3b'),
225$s = $langs->trans(
"LibraryToBuildPDF").
"<br>";
228if (class_exists(
'FPDF') && !class_exists(
'TCPDF')) {
233 $s .=
' ('.@constant(
'FPDF_PATH').
')';
236if (class_exists(
'TCPDF')) {
241 $s .=
' ('.@constant(
'TCPDF_PATH').
')';
244if (class_exists(
'FPDI')) {
249 $s .=
' ('.@constant(
'FPDI_PATH').
')';
252if (class_exists(
'TCPDI')) {
257 $s .=
' ('.@constant(
'TCPDI_PATH').
')';
267print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFDesc"), $s).
"</span><br>\n";
270$noCountryCode = empty($mysoc->country_code);
272print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
273print
'<input type="hidden" name="token" value="'.newToken().
'">';
274print
'<input type="hidden" name="action" value="update">';
280 print
'<div class="warning">';
281 print
'The not supported and hidden option PDF_SECURITY_ENCRYPTION has been enabled. This means a lof of feature related to PDF will be broken, like mass PDF generation or online signature of PDF.'.
"\n";
282 print
'You should disable this option.';
292print
'<div class="div-table-responsive-no-min">';
293print
'<table summary="more" class="noborder centpercent">';
294print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
297if (empty($selected)) {
303print
'<tr class="oddeven"><td>'.$langs->trans(
"DictionaryPaperFormat").
'</td><td>';
304print $formadmin->select_paper_format($selected,
'MAIN_PDF_FORMAT');
307print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_LEFT").
'</td><td>';
308print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_LEFT', 10).
'">';
310print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_RIGHT").
'</td><td>';
311print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_RIGHT', 10).
'">';
313print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_TOP").
'</td><td>';
314print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_TOP', 10).
'">';
316print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_BOTTOM").
'</td><td>';
317print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_BOTTOM', 10).
'">';
329print
'<div class="div-table-responsive-no-min">';
330print
'<table summary="more" class="noborder centpercent">';
331print
'<tr class="liste_titre"><td class="">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
347print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowVATIntaInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
348if ($conf->use_javascript_ajax) {
349 print ajax_constantonoff(
'MAIN_TVAINTRA_NOT_IN_ADDRESS');
351 print $form->selectyesno(
'MAIN_TVAINTRA_NOT_IN_ADDRESS',
getDolGlobalInt(
'MAIN_TVAINTRA_NOT_IN_ADDRESS'), 1);
356for ($i = 1; $i <= 6; $i++) {
357 if (!$noCountryCode) {
358 $pid = $langs->transcountry(
"ProfId".$i, $mysoc->country_code);
363 $pid =
img_warning().
' <span class="error">'.$langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CompanyCountry")).
'</span>';
366 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProfIdInAddress").
' - '.$pid.
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
367 $keyforconstant =
'MAIN_PROFID'.$i.
'_IN_ADDRESS';
368 if ($conf->use_javascript_ajax) {
369 print ajax_constantonoff($keyforconstant);
371 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
377print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowLegalFormInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
378$keyforconstant =
'MAIN_LEGALFORM_IN_ADDRESS';
379if ($conf->use_javascript_ajax) {
380 print ajax_constantonoff($keyforconstant);
382 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
389print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_SENDER_FRAME").
'</td><td>';
390if ($conf->use_javascript_ajax) {
391 print ajax_constantonoff(
'MAIN_PDF_NO_SENDER_FRAME');
393 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
394 print $form->selectarray(
"MAIN_PDF_NO_SENDER_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_SENDER_FRAME'));
398print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_RECIPENT_FRAME").
'</td><td>';
399if ($conf->use_javascript_ajax) {
400 print ajax_constantonoff(
'MAIN_PDF_NO_RECIPENT_FRAME');
402 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
403 print $form->selectarray(
"MAIN_PDF_NO_RECIPENT_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_RECIPENT_FRAME'));
409print
'<tr class="oddeven"><td>'.$langs->trans(
"SwapSenderAndRecipientOnPDF").
'</td><td>';
410if ($conf->use_javascript_ajax) {
411 print ajax_constantonoff(
'MAIN_INVERT_SENDER_RECIPIENT');
413 print $form->selectyesno(
'MAIN_INVERT_SENDER_RECIPIENT',
getDolGlobalInt(
'MAIN_INVERT_SENDER_RECIPIENT'), 1);
419print
'<tr class="oddeven"><td>'.$langs->trans(
"PlaceCustomerAddressToIsoLocation").
'</td><td>';
420if ($conf->use_javascript_ajax) {
421 print ajax_constantonoff(
'MAIN_PDF_USE_ISO_LOCATION');
423 print $form->selectyesno(
'MAIN_PDF_USE_ISO_LOCATION',
getDolGlobalInt(
'MAIN_PDF_USE_ISO_LOCATION'), 1);
428print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").
'</td><td>';
429if ($conf->use_javascript_ajax) {
430 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"THIRDPARTY_ALIAS"),
'2' => $langs->trans(
"ALIAS_THIRDPARTY"));
431 print $form->selectarray(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval,
getDolGlobalInt(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME'));
444if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
445 if ($mysoc->useLocalTax(1)) {
446 $locales = $langs->transcountry(
"LT1", $mysoc->country_code);
447 $text =
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT1", $mysoc->country_code)).
'</td><td>';
448 if ($conf->use_javascript_ajax) {
449 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX');
451 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX'), 1);
453 $text .=
'</td></tr>';
456 if ($mysoc->useLocalTax(2)) {
457 $locales .= ($locales ?
' & ' :
'').$langs->transcountry(
"LT2", $mysoc->country_code);
459 $text .=
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT2", $mysoc->country_code)).
'</td><td>';
460 if ($conf->use_javascript_ajax) {
461 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX');
463 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX'), 1);
465 $text .=
'</td></tr>';
469$title = $langs->trans(
"PDFRulesForSalesTax");
470if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
471 $title .=
' - '.$langs->trans(
"PDFLocaltax", $locales);
477print
'<table summary="more" class="noborder centpercent">';
478print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
482print
'<tr class="oddeven"><td>'.$langs->trans(
"HideAnyVATInformationOnPDF").
'</td><td>';
483if ($conf->use_javascript_ajax) {
484 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT');
486 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT'), 1);
501print
'<div class="div-table-responsive-no-min">';
502print
'<table summary="more" class="noborder centpercent">';
503print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
507print
'<tr class="oddeven"><td>';
508print $form->textwithpicto($langs->trans(
"PDFIn2Languages"), $langs->trans(
"PDF_USE_ALSO_LANGUAGE_CODE"));
510$selected = GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE') ?
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE') :
getDolGlobalString(
'PDF_USE_ALSO_LANGUAGE_CODE');
511print $formadmin->select_language($selected,
'PDF_USE_ALSO_LANGUAGE_CODE', 0,
null, 1);
515print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_DOCUMENTS_LOGO_HEIGHT").
'</td><td>';
516print
'<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" value="'.getDolGlobalInt(
'MAIN_DOCUMENTS_LOGO_HEIGHT', 20).
'">';
520if (isModEnabled(
'project')) {
521 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_PROJECT").
'</td><td>';
522 $tmparray = array(
'no' =>
'No',
'showprojectref' =>
'RefProject',
'showprojectlabel' =>
'ShowProjectLabel');
524 print $form->selectarray(
'PDF_SHOW_PROJECT_REF_OR_LABEL', $tmparray, $showprojectref, 0, 0, 0,
'', 1);
530print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_CODE");
532if ($conf->use_javascript_ajax) {
533 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_CODE');
535 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
536 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_CODE'));
542print
'<tr class="oddeven"><td>'.$langs->trans(
"HideRefOnPDF").
'</td><td>';
543if ($conf->use_javascript_ajax) {
544 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF');
546 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF'), 1);
552if (isModEnabled(
'barcode')) {
553 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProductBarcodeOnPDF").
'</td><td>';
554 if ($conf->use_javascript_ajax) {
555 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE');
557 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE'), 1);
564print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDescOnPDF").
'</td><td>';
565if ($conf->use_javascript_ajax) {
566 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC');
568 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC'), 1);
574print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDetailsOnPDF").
'</td><td>';
575if ($conf->use_javascript_ajax) {
576 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS');
578 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS'), 1);
584print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldLabelOnPDF").
'</td><td>';
585if ($conf->use_javascript_ajax) {
586 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_LABEL');
588 print $form->selectyesno(
'PDF_BOLD_PRODUCT_LABEL',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_LABEL'), 1);
594print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldRefAndPeriodOnPDF").
'</td><td>';
595if ($conf->use_javascript_ajax) {
596 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD');
598 print $form->selectyesno(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD'), 1);
604print
'<tr class="oddeven"><td>'.$langs->trans(
"SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv(
"AssociatedProductsAbility"), $langs->transnoentitiesnoconv(
"Products")).
'</td><td>';
605if ($conf->use_javascript_ajax) {
606 print ajax_constantonoff(
'SHOW_SUBPRODUCT_REF_IN_PDF');
608 print $form->selectyesno(
'SHOW_SUBPRODUCT_REF_IN_PDF',
getDolGlobalInt(
'SHOW_SUBPRODUCT_REF_IN_PDF'), 1);
614print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowDetailsInPDFPageFoot").
'</td><td>';
615print $form->selectarray(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS',
'0'));
620print
'<tr class="oddeven"><td>'.$langs->trans(
"DOC_SHOW_FIRST_SALES_REP");
621print
' <span class="opacitymedium">('.$langs->trans(
"SalesRepresentativeInfo").
')</span>';
623if ($conf->use_javascript_ajax) {
624 print ajax_constantonoff(
'DOC_SHOW_FIRST_SALES_REP');
626 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
627 print $form->selectarray(
"DOC_SHOW_FIRST_SALES_REP", $arrval,
getDolGlobalString(
'DOC_SHOW_FIRST_SALES_REP'));
632print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT").
'</td><td>';
633if ($conf->use_javascript_ajax) {
634 print ajax_constantonoff(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT');
636 print $form->selectyesno(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
getDolGlobalInt(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT'), 1);
640print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_USE_A").
'</td><td>';
641print $form->selectarray(
'PDF_USE_A', $arraylistofpdfformat,
getDolGlobalString(
'PDF_USE_A',
'0'));
647print $form->buttonsSaveCancel(
"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.
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_getDefaultFormat(Translate $outputlangs=null)
Try to guess default paper format according to language into $langs.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning 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)
Show tabs of a record.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
pdf_admin_prepare_head()
Return array head with list of tabs to view object information.
pdf_getInstance($format='', $metric='mm', $pagetype='P')
Return a PDF instance object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.