29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
38$langs->loadLangs(array(
'admin',
'companies',
'languages',
'members',
'other',
'products',
'stocks',
'trips'));
44$action =
GETPOST(
'action',
'aZ09');
45$cancel =
GETPOST(
'cancel',
'alpha');
56if ($action ==
'update') {
57 if (GETPOSTISSET(
'MAIN_PDF_FORMAT')) {
61 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_LEFT')) {
64 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_RIGHT')) {
67 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_TOP')) {
70 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_BOTTOM')) {
74 if (GETPOSTISSET(
'MAIN_PROFID1_IN_ADDRESS')) {
77 if (GETPOSTISSET(
'MAIN_PROFID2_IN_ADDRESS')) {
80 if (GETPOSTISSET(
'MAIN_PROFID3_IN_ADDRESS')) {
83 if (GETPOSTISSET(
'MAIN_PROFID4_IN_ADDRESS')) {
86 if (GETPOSTISSET(
'MAIN_PROFID5_IN_ADDRESS')) {
89 if (GETPOSTISSET(
'MAIN_PROFID6_IN_ADDRESS')) {
93 if (GETPOSTISSET(
'MAIN_PDF_NO_SENDER_FRAME')) {
96 if (GETPOSTISSET(
'MAIN_PDF_NO_RECIPENT_FRAME')) {
97 dolibarr_set_const($db,
"MAIN_PDF_NO_RECIPENT_FRAME",
GETPOST(
"MAIN_PDF_NO_RECIPENT_FRAME"),
'chaine', 0,
'', $conf->entity);
104 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) {
105 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"),
'chaine', 0,
'', $conf->entity);
108 if (GETPOSTISSET(
'MAIN_TVAINTRA_NOT_IN_ADDRESS')) {
109 dolibarr_set_const($db,
"MAIN_TVAINTRA_NOT_IN_ADDRESS",
GETPOST(
"MAIN_TVAINTRA_NOT_IN_ADDRESS"),
'chaine', 0,
'', $conf->entity);
112 if (isModEnabled(
'project')) {
113 if (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'no') {
116 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectref') {
119 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectlabel') {
121 dolibarr_set_const($db,
"PDF_SHOW_PROJECT_TITLE",
GETPOST(
"PDF_SHOW_PROJECT_REF_OR_LABEL"),
'chaine', 0,
'', $conf->entity);
125 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS')) {
126 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"),
'chaine', 0,
'', $conf->entity);
128 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC')) {
129 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_DESC",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_DESC"),
'chaine', 0,
'', $conf->entity);
131 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF')) {
132 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_REF",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_REF"),
'chaine', 0,
'', $conf->entity);
135 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE')) {
136 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE"),
'chaine', 0,
'', $conf->entity);
139 if (GETPOSTISSET(
'MAIN_DOCUMENTS_LOGO_HEIGHT')) {
142 if (GETPOSTISSET(
'MAIN_INVERT_SENDER_RECIPIENT')) {
143 dolibarr_set_const($db,
"MAIN_INVERT_SENDER_RECIPIENT",
GETPOST(
"MAIN_INVERT_SENDER_RECIPIENT"),
'chaine', 0,
'', $conf->entity);
145 if (GETPOSTISSET(
'MAIN_PDF_USE_ISO_LOCATION')) {
146 dolibarr_set_const($db,
"MAIN_PDF_USE_ISO_LOCATION",
GETPOST(
"MAIN_PDF_USE_ISO_LOCATION"),
'chaine', 0,
'', $conf->entity);
148 if (GETPOSTISSET(
'MAIN_PDF_NO_CUSTOMER_CODE')) {
149 dolibarr_set_const($db,
"MAIN_PDF_NO_CUSTOMER_CODE",
GETPOST(
"MAIN_PDF_NO_CUSTOMER_CODE"),
'chaine', 0,
'', $conf->entity);
152 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
153 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"),
'chaine', 0,
'', $conf->entity);
156 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX')) {
157 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_SECOND_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_SECOND_TAX"),
'chaine', 0,
'', $conf->entity);
159 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX')) {
160 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_THIRD_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_THIRD_TAX"),
'chaine', 0,
'', $conf->entity);
163 if (GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE')) {
164 dolibarr_set_const($db,
"PDF_USE_ALSO_LANGUAGE_CODE",
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE',
'alpha'),
'chaine', 0,
'', $conf->entity);
166 if (GETPOSTISSET(
'SHOW_SUBPRODUCT_REF_IN_PDF')) {
167 dolibarr_set_const($db,
"SHOW_SUBPRODUCT_REF_IN_PDF",
GETPOST(
'SHOW_SUBPRODUCT_REF_IN_PDF',
'alpha'),
'chaine', 0,
'', $conf->entity);
170 if (GETPOSTISSET(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT')) {
171 dolibarr_set_const($db,
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT",
GETPOST(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
'alpha'),
'chaine', 0,
'', $conf->entity);
174 if (GETPOSTISSET(
'DOC_SHOW_FIRST_SALES_REP')) {
175 dolibarr_set_const($db,
"DOC_SHOW_FIRST_SALES_REP",
GETPOST(
'DOC_SHOW_FIRST_SALES_REP',
'alpha'),
'chaine', 0,
'', $conf->entity);
178 if (GETPOSTISSET(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) {
179 dolibarr_set_const($db,
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME",
GETPOST(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME',
'alpha'),
'chaine', 0,
'', $conf->entity);
181 if (GETPOSTISSET(
'PDF_USE_A')) {
185 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_LABEL')) {
186 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_LABEL",
GETPOST(
'PDF_BOLD_PRODUCT_LABEL',
'alpha'),
'chaine', 0,
'', $conf->entity);
188 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD')) {
189 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_REF_AND_PERIOD",
GETPOST(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
'alpha'),
'chaine', 0,
'', $conf->entity);
194 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
204$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
205llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf');
207$form =
new Form($db);
211$arraydetailsforpdffoot = array(
212 0 => $langs->transnoentitiesnoconv(
'NoDetails'),
213 1 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfo'),
214 2 => $langs->transnoentitiesnoconv(
'DisplayCompanyManagers'),
215 3 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfoAndManagers')
218$arraylistofpdfformat = array(
219 0 => $langs->transnoentitiesnoconv(
'PDF 1.7'),
220 1 => $langs->transnoentitiesnoconv(
'PDF/A-1b'),
221 3 => $langs->transnoentitiesnoconv(
'PDF/A-3b'),
224$s = $langs->trans(
"LibraryToBuildPDF").
"<br>";
227if (class_exists(
'FPDF') && !class_exists(
'TCPDF')) {
232 $s .=
' ('.@constant(
'FPDF_PATH').
')';
235if (class_exists(
'TCPDF')) {
240 $s .=
' ('.@constant(
'TCPDF_PATH').
')';
243if (class_exists(
'FPDI')) {
248 $s .=
' ('.@constant(
'FPDI_PATH').
')';
251if (class_exists(
'TCPDI')) {
256 $s .=
' ('.@constant(
'TCPDI_PATH').
')';
266print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFDesc"), $s).
"</span><br>\n";
269$noCountryCode = (empty($mysoc->country_code) ? true :
false);
271print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
272print
'<input type="hidden" name="token" value="'.newToken().
'">';
273print
'<input type="hidden" name="action" value="update">';
279 print
'<div class="warning">';
280 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";
281 print
'You should disable this option.';
291print
'<div class="div-table-responsive-no-min">';
292print
'<table summary="more" class="noborder centpercent">';
293print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
296if (empty($selected)) {
302print
'<tr class="oddeven"><td>'.$langs->trans(
"DictionaryPaperFormat").
'</td><td>';
303print $formadmin->select_paper_format($selected,
'MAIN_PDF_FORMAT');
306print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_LEFT").
'</td><td>';
307print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_LEFT', 10).
'">';
309print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_RIGHT").
'</td><td>';
310print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_RIGHT', 10).
'">';
312print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_TOP").
'</td><td>';
313print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_TOP', 10).
'">';
315print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_BOTTOM").
'</td><td>';
316print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_BOTTOM', 10).
'">';
328print
'<div class="div-table-responsive-no-min">';
329print
'<table summary="more" class="noborder centpercent">';
330print
'<tr class="liste_titre"><td class="">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
346print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowVATIntaInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
347if ($conf->use_javascript_ajax) {
348 print ajax_constantonoff(
'MAIN_TVAINTRA_NOT_IN_ADDRESS');
350 print $form->selectyesno(
'MAIN_TVAINTRA_NOT_IN_ADDRESS',
getDolGlobalInt(
'MAIN_TVAINTRA_NOT_IN_ADDRESS'), 1);
355for ($i = 1; $i <= 6; $i++) {
356 if (!$noCountryCode) {
357 $pid = $langs->transcountry(
"ProfId".$i, $mysoc->country_code);
362 $pid =
img_warning().
' <span class="error">'.$langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CompanyCountry")).
'</span>';
365 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProfIdInAddress").
' - '.$pid.
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
366 $keyforconstant =
'MAIN_PROFID'.$i.
'_IN_ADDRESS';
367 if ($conf->use_javascript_ajax) {
368 print ajax_constantonoff($keyforconstant);
370 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
376print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowLegalFormInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
377$keyforconstant =
'MAIN_LEGALFORM_IN_ADDRESS';
378if ($conf->use_javascript_ajax) {
379 print ajax_constantonoff($keyforconstant);
381 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
388print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_SENDER_FRAME").
'</td><td>';
389if ($conf->use_javascript_ajax) {
390 print ajax_constantonoff(
'MAIN_PDF_NO_SENDER_FRAME');
392 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
393 print $form->selectarray(
"MAIN_PDF_NO_SENDER_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_SENDER_FRAME'));
397print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_RECIPENT_FRAME").
'</td><td>';
398if ($conf->use_javascript_ajax) {
399 print ajax_constantonoff(
'MAIN_PDF_NO_RECIPENT_FRAME');
401 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
402 print $form->selectarray(
"MAIN_PDF_NO_RECIPENT_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_RECIPENT_FRAME'));
408print
'<tr class="oddeven"><td>'.$langs->trans(
"SwapSenderAndRecipientOnPDF").
'</td><td>';
409if ($conf->use_javascript_ajax) {
410 print ajax_constantonoff(
'MAIN_INVERT_SENDER_RECIPIENT');
412 print $form->selectyesno(
'MAIN_INVERT_SENDER_RECIPIENT',
getDolGlobalInt(
'MAIN_INVERT_SENDER_RECIPIENT'), 1);
418print
'<tr class="oddeven"><td>'.$langs->trans(
"PlaceCustomerAddressToIsoLocation").
'</td><td>';
419if ($conf->use_javascript_ajax) {
420 print ajax_constantonoff(
'MAIN_PDF_USE_ISO_LOCATION');
422 print $form->selectyesno(
'MAIN_PDF_USE_ISO_LOCATION',
getDolGlobalInt(
'MAIN_PDF_USE_ISO_LOCATION'), 1);
427print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").
'</td><td>';
428if ($conf->use_javascript_ajax) {
429 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"THIRDPARTY_ALIAS"),
'2' => $langs->trans(
"ALIAS_THIRDPARTY"));
430 print $form->selectarray(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval,
getDolGlobalInt(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME'));
443if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
444 if ($mysoc->useLocalTax(1)) {
445 $locales = $langs->transcountry(
"LT1", $mysoc->country_code);
446 $text =
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT1", $mysoc->country_code)).
'</td><td>';
447 if ($conf->use_javascript_ajax) {
448 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX');
450 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX'), 1);
452 $text .=
'</td></tr>';
455 if ($mysoc->useLocalTax(2)) {
456 $locales .= ($locales ?
' & ' :
'').$langs->transcountry(
"LT2", $mysoc->country_code);
458 $text .=
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT2", $mysoc->country_code)).
'</td><td>';
459 if ($conf->use_javascript_ajax) {
460 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX');
462 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX'), 1);
464 $text .=
'</td></tr>';
468$title = $langs->trans(
"PDFRulesForSalesTax");
469if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
470 $title .=
' - '.$langs->trans(
"PDFLocaltax", $locales);
476print
'<table summary="more" class="noborder centpercent">';
477print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
481print
'<tr class="oddeven"><td>'.$langs->trans(
"HideAnyVATInformationOnPDF").
'</td><td>';
482if ($conf->use_javascript_ajax) {
483 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT');
485 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT'), 1);
500print
'<div class="div-table-responsive-no-min">';
501print
'<table summary="more" class="noborder centpercent">';
502print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
506print
'<tr class="oddeven"><td>';
507print $form->textwithpicto($langs->trans(
"PDFIn2Languages"), $langs->trans(
"PDF_USE_ALSO_LANGUAGE_CODE"));
509$selected = GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE') ?
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE') :
getDolGlobalString(
'PDF_USE_ALSO_LANGUAGE_CODE');
510print $formadmin->select_language($selected,
'PDF_USE_ALSO_LANGUAGE_CODE', 0,
null, 1);
514print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_DOCUMENTS_LOGO_HEIGHT").
'</td><td>';
515print
'<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" value="'.getDolGlobalInt(
'MAIN_DOCUMENTS_LOGO_HEIGHT', 20).
'">';
519if (isModEnabled(
'project')) {
520 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_PROJECT").
'</td><td>';
521 $tmparray = array(
'no' =>
'No',
'showprojectref' =>
'RefProject',
'showprojectlabel' =>
'ShowProjectLabel');
523 print $form->selectarray(
'PDF_SHOW_PROJECT_REF_OR_LABEL', $tmparray, $showprojectref, 0, 0, 0,
'', 1);
529print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_CODE");
531if ($conf->use_javascript_ajax) {
532 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_CODE');
534 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
535 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_CODE'));
541print
'<tr class="oddeven"><td>'.$langs->trans(
"HideRefOnPDF").
'</td><td>';
542if ($conf->use_javascript_ajax) {
543 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF');
545 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF'), 1);
551if (isModEnabled(
'barcode')) {
552 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProductBarcodeOnPDF").
'</td><td>';
553 if ($conf->use_javascript_ajax) {
554 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE');
556 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE'), 1);
563print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDescOnPDF").
'</td><td>';
564if ($conf->use_javascript_ajax) {
565 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC');
567 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC'), 1);
573print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDetailsOnPDF").
'</td><td>';
574if ($conf->use_javascript_ajax) {
575 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS');
577 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS'), 1);
583print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldLabelOnPDF").
'</td><td>';
584if ($conf->use_javascript_ajax) {
585 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_LABEL');
587 print $form->selectyesno(
'PDF_BOLD_PRODUCT_LABEL',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_LABEL'), 1);
593print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldRefAndPeriodOnPDF").
'</td><td>';
594if ($conf->use_javascript_ajax) {
595 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD');
597 print $form->selectyesno(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD'), 1);
603print
'<tr class="oddeven"><td>'.$langs->trans(
"SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv(
"AssociatedProductsAbility"), $langs->transnoentitiesnoconv(
"Products")).
'</td><td>';
604if ($conf->use_javascript_ajax) {
605 print ajax_constantonoff(
'SHOW_SUBPRODUCT_REF_IN_PDF');
607 print $form->selectyesno(
'SHOW_SUBPRODUCT_REF_IN_PDF',
getDolGlobalInt(
'SHOW_SUBPRODUCT_REF_IN_PDF'), 1);
613print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowDetailsInPDFPageFoot").
'</td><td>';
614print $form->selectarray(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS',
'0'));
619print
'<tr class="oddeven"><td>'.$langs->trans(
"DOC_SHOW_FIRST_SALES_REP");
620print
' <span class="opacitymedium">('.$langs->trans(
"SalesRepresentativeInfo").
')</span>';
622if ($conf->use_javascript_ajax) {
623 print ajax_constantonoff(
'DOC_SHOW_FIRST_SALES_REP');
625 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
626 print $form->selectarray(
"DOC_SHOW_FIRST_SALES_REP", $arrval,
getDolGlobalString(
'DOC_SHOW_FIRST_SALES_REP'));
631print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT").
'</td><td>';
632if ($conf->use_javascript_ajax) {
633 print ajax_constantonoff(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT');
635 print $form->selectyesno(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
getDolGlobalInt(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT'), 1);
639print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_USE_A").
'</td><td>';
640print $form->selectarray(
'PDF_USE_A', $arraylistofpdfformat,
getDolGlobalString(
'PDF_USE_A',
'0'));
646print $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()
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 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.