32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
41$langs->loadLangs(array(
'admin',
'companies',
'languages',
'members',
'other',
'products',
'stocks',
'trips'));
47$action =
GETPOST(
'action',
'aZ09');
48$cancel =
GETPOST(
'cancel',
'alpha');
59if ($action ==
'update') {
60 if (GETPOSTISSET(
'MAIN_PDF_FORMAT')) {
64 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_LEFT')) {
67 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_RIGHT')) {
70 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_TOP')) {
73 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_BOTTOM')) {
77 if (GETPOSTISSET(
'MAIN_PROFID1_IN_ADDRESS')) {
80 if (GETPOSTISSET(
'MAIN_PROFID2_IN_ADDRESS')) {
83 if (GETPOSTISSET(
'MAIN_PROFID3_IN_ADDRESS')) {
86 if (GETPOSTISSET(
'MAIN_PROFID4_IN_ADDRESS')) {
89 if (GETPOSTISSET(
'MAIN_PROFID5_IN_ADDRESS')) {
92 if (GETPOSTISSET(
'MAIN_PROFID6_IN_ADDRESS')) {
96 if (GETPOSTISSET(
'MAIN_PDF_NO_SENDER_FRAME')) {
99 if (GETPOSTISSET(
'MAIN_PDF_NO_RECIPENT_FRAME')) {
100 dolibarr_set_const($db,
"MAIN_PDF_NO_RECIPENT_FRAME",
GETPOST(
"MAIN_PDF_NO_RECIPENT_FRAME"),
'chaine', 0,
'', $conf->entity);
107 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) {
108 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"),
'chaine', 0,
'', $conf->entity);
111 if (GETPOSTISSET(
'MAIN_TVAINTRA_NOT_IN_ADDRESS')) {
112 dolibarr_set_const($db,
"MAIN_TVAINTRA_NOT_IN_ADDRESS",
GETPOST(
"MAIN_TVAINTRA_NOT_IN_ADDRESS"),
'chaine', 0,
'', $conf->entity);
115 if (isModEnabled(
'project')) {
116 if (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'no') {
119 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectref') {
122 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectlabel') {
124 dolibarr_set_const($db,
"PDF_SHOW_PROJECT_TITLE",
GETPOST(
"PDF_SHOW_PROJECT_REF_OR_LABEL"),
'chaine', 0,
'', $conf->entity);
128 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS')) {
129 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"),
'chaine', 0,
'', $conf->entity);
131 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC')) {
132 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_DESC",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_DESC"),
'chaine', 0,
'', $conf->entity);
134 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF')) {
135 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_REF",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_REF"),
'chaine', 0,
'', $conf->entity);
138 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE')) {
139 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE"),
'chaine', 0,
'', $conf->entity);
142 if (GETPOSTISSET(
'MAIN_DOCUMENTS_LOGO_HEIGHT')) {
145 if (GETPOSTISSET(
'MAIN_PDF_FRAME_CORNER_RADIUS')) {
148 if (GETPOSTISSET(
'MAIN_INVERT_SENDER_RECIPIENT')) {
149 dolibarr_set_const($db,
"MAIN_INVERT_SENDER_RECIPIENT",
GETPOST(
"MAIN_INVERT_SENDER_RECIPIENT"),
'chaine', 0,
'', $conf->entity);
151 if (GETPOSTISSET(
'MAIN_PDF_USE_ISO_LOCATION')) {
152 dolibarr_set_const($db,
"MAIN_PDF_USE_ISO_LOCATION",
GETPOST(
"MAIN_PDF_USE_ISO_LOCATION"),
'chaine', 0,
'', $conf->entity);
154 if (GETPOSTISSET(
'MAIN_PDF_NO_CUSTOMER_CODE')) {
155 dolibarr_set_const($db,
"MAIN_PDF_NO_CUSTOMER_CODE",
GETPOST(
"MAIN_PDF_NO_CUSTOMER_CODE"),
'chaine', 0,
'', $conf->entity);
158 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
159 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"),
'chaine', 0,
'', $conf->entity);
162 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX')) {
163 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_SECOND_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_SECOND_TAX"),
'chaine', 0,
'', $conf->entity);
165 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX')) {
166 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_THIRD_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_THIRD_TAX"),
'chaine', 0,
'', $conf->entity);
169 if (GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE')) {
170 dolibarr_set_const($db,
"PDF_USE_ALSO_LANGUAGE_CODE",
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE',
'alpha'),
'chaine', 0,
'', $conf->entity);
172 if (GETPOSTISSET(
'SHOW_SUBPRODUCT_REF_IN_PDF')) {
173 dolibarr_set_const($db,
"SHOW_SUBPRODUCT_REF_IN_PDF",
GETPOST(
'SHOW_SUBPRODUCT_REF_IN_PDF',
'alpha'),
'chaine', 0,
'', $conf->entity);
176 if (GETPOSTISSET(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT')) {
177 dolibarr_set_const($db,
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT",
GETPOST(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
'alpha'),
'chaine', 0,
'', $conf->entity);
180 if (GETPOSTISSET(
'DOC_SHOW_FIRST_SALES_REP')) {
181 dolibarr_set_const($db,
"DOC_SHOW_FIRST_SALES_REP",
GETPOST(
'DOC_SHOW_FIRST_SALES_REP',
'alpha'),
'chaine', 0,
'', $conf->entity);
184 if (GETPOSTISSET(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) {
185 dolibarr_set_const($db,
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME",
GETPOST(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME',
'alpha'),
'chaine', 0,
'', $conf->entity);
187 if (GETPOSTISSET(
'PDF_USE_A')) {
191 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_LABEL')) {
192 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_LABEL",
GETPOST(
'PDF_BOLD_PRODUCT_LABEL',
'alpha'),
'chaine', 0,
'', $conf->entity);
194 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD')) {
195 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_REF_AND_PERIOD",
GETPOST(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
'alpha'),
'chaine', 0,
'', $conf->entity);
200 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
210$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
211llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf');
213$form =
new Form($db);
217$arraydetailsforpdffoot = array(
218 0 => $langs->transnoentitiesnoconv(
'NoDetails'),
219 1 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfo'),
220 2 => $langs->transnoentitiesnoconv(
'DisplayCompanyManagers'),
221 3 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfoAndManagers')
224$arraylistofpdfformat = array(
225 0 => $langs->transnoentitiesnoconv(
'PDF 1.7'),
226 1 => $langs->transnoentitiesnoconv(
'PDF/A-1b'),
227 3 => $langs->transnoentitiesnoconv(
'PDF/A-3b'),
230$s = $langs->trans(
"LibraryToBuildPDF").
"<br>";
233if (class_exists(
'FPDF') && !class_exists(
'TCPDF')) {
238 $s .=
' ('.@constant(
'FPDF_PATH').
')';
241if (class_exists(
'TCPDF')) {
246 $s .=
' ('.@constant(
'TCPDF_PATH').
')';
249if (class_exists(
'FPDI')) {
254 $s .=
' ('.@constant(
'FPDI_PATH').
')';
257if (class_exists(
'TCPDI')) {
262 $s .=
' ('.@constant(
'TCPDI_PATH').
')';
272print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFDesc"), $s).
"</span><br>\n";
275$noCountryCode = empty($mysoc->country_code);
277print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
278print
'<input type="hidden" name="token" value="'.newToken().
'">';
279print
'<input type="hidden" name="action" value="update">';
285 print
'<div class="warning">';
286 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";
287 print
'You should disable this option.';
297print
'<div class="div-table-responsive-no-min">';
298print
'<table summary="more" class="noborder centpercent">';
299print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
302if (empty($selected)) {
308print
'<tr class="oddeven"><td>'.$langs->trans(
"DictionaryPaperFormat").
'</td><td>';
309print $formadmin->select_paper_format($selected,
'MAIN_PDF_FORMAT');
312print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_LEFT").
'</td><td>';
313print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_LEFT', 10).
'">';
315print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_RIGHT").
'</td><td>';
316print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_RIGHT', 10).
'">';
318print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_TOP").
'</td><td>';
319print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_TOP', 10).
'">';
321print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_BOTTOM").
'</td><td>';
322print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_BOTTOM', 10).
'">';
334print
'<div class="div-table-responsive-no-min">';
335print
'<table summary="more" class="noborder centpercent">';
336print
'<tr class="liste_titre"><td class="">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
352print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowVATIntaInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
353if ($conf->use_javascript_ajax) {
354 print ajax_constantonoff(
'MAIN_TVAINTRA_NOT_IN_ADDRESS');
356 print $form->selectyesno(
'MAIN_TVAINTRA_NOT_IN_ADDRESS',
getDolGlobalInt(
'MAIN_TVAINTRA_NOT_IN_ADDRESS'), 1);
361for ($i = 1; $i <= 6; $i++) {
362 if (!$noCountryCode) {
363 $pid = $langs->transcountry(
"ProfId".$i, $mysoc->country_code);
368 $pid =
img_warning().
' <span class="error">'.$langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CompanyCountry")).
'</span>';
371 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProfIdInAddress").
' - '.$pid.
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
372 $keyforconstant =
'MAIN_PROFID'.$i.
'_IN_ADDRESS';
373 if ($conf->use_javascript_ajax) {
374 print ajax_constantonoff($keyforconstant);
376 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
382print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowLegalFormInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
383$keyforconstant =
'MAIN_LEGALFORM_IN_ADDRESS';
384if ($conf->use_javascript_ajax) {
385 print ajax_constantonoff($keyforconstant);
387 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
394print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_SENDER_FRAME").
'</td><td>';
395if ($conf->use_javascript_ajax) {
396 print ajax_constantonoff(
'MAIN_PDF_NO_SENDER_FRAME');
398 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
399 print $form->selectarray(
"MAIN_PDF_NO_SENDER_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_SENDER_FRAME'));
403print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_RECIPENT_FRAME").
'</td><td>';
404if ($conf->use_javascript_ajax) {
405 print ajax_constantonoff(
'MAIN_PDF_NO_RECIPENT_FRAME');
407 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
408 print $form->selectarray(
"MAIN_PDF_NO_RECIPENT_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_RECIPENT_FRAME'));
414print
'<tr class="oddeven"><td>'.$langs->trans(
"SwapSenderAndRecipientOnPDF").
'</td><td>';
415if ($conf->use_javascript_ajax) {
416 print ajax_constantonoff(
'MAIN_INVERT_SENDER_RECIPIENT');
418 print $form->selectyesno(
'MAIN_INVERT_SENDER_RECIPIENT',
getDolGlobalInt(
'MAIN_INVERT_SENDER_RECIPIENT'), 1);
424print
'<tr class="oddeven"><td>'.$langs->trans(
"PlaceCustomerAddressToIsoLocation").
'</td><td>';
425if ($conf->use_javascript_ajax) {
426 print ajax_constantonoff(
'MAIN_PDF_USE_ISO_LOCATION');
428 print $form->selectyesno(
'MAIN_PDF_USE_ISO_LOCATION',
getDolGlobalInt(
'MAIN_PDF_USE_ISO_LOCATION'), 1);
433print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").
'</td><td>';
434if ($conf->use_javascript_ajax) {
435 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"THIRDPARTY_ALIAS"),
'2' => $langs->trans(
"ALIAS_THIRDPARTY"));
436 print $form->selectarray(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval,
getDolGlobalInt(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME'));
449if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
450 if ($mysoc->useLocalTax(1)) {
451 $locales = $langs->transcountry(
"LT1", $mysoc->country_code);
452 $text =
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT1", $mysoc->country_code)).
'</td><td>';
453 if ($conf->use_javascript_ajax) {
454 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX');
456 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX'), 1);
458 $text .=
'</td></tr>';
461 if ($mysoc->useLocalTax(2)) {
462 $locales .= ($locales ?
' & ' :
'').$langs->transcountry(
"LT2", $mysoc->country_code);
464 $text .=
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT2", $mysoc->country_code)).
'</td><td>';
465 if ($conf->use_javascript_ajax) {
466 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX');
468 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX'), 1);
470 $text .=
'</td></tr>';
474$title = $langs->trans(
"PDFRulesForSalesTax");
475if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
476 $title .=
' - '.$langs->trans(
"PDFLocaltax", $locales);
482print
'<table summary="more" class="noborder centpercent">';
483print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
487print
'<tr class="oddeven"><td>'.$langs->trans(
"HideAnyVATInformationOnPDF").
'</td><td>';
488if ($conf->use_javascript_ajax) {
489 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT');
491 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT'), 1);
506print
'<div class="div-table-responsive-no-min">';
507print
'<table summary="more" class="noborder centpercent">';
508print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
512print
'<tr class="oddeven"><td>';
513print $form->textwithpicto($langs->trans(
"PDFIn2Languages"), $langs->trans(
"PDF_USE_ALSO_LANGUAGE_CODE"));
515$selected = GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE') ?
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE') :
getDolGlobalString(
'PDF_USE_ALSO_LANGUAGE_CODE');
516print $formadmin->select_language($selected,
'PDF_USE_ALSO_LANGUAGE_CODE', 0, array(), 1);
520print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_DOCUMENTS_LOGO_HEIGHT").
'</td><td>';
521print
'<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" value="'.getDolGlobalInt(
'MAIN_DOCUMENTS_LOGO_HEIGHT', 20).
'">';
525print
'<tr class="oddeven"><td>';
526print $form->textwithpicto($langs->trans(
"PDFBoxFrameRoundedCorners"), $langs->trans(
"MAIN_PDF_FRAME_CORNER_RADIUS"));
528$arrval = array(
'0',
'1',
'2',
'3');
529print $form->selectarray(
"MAIN_PDF_FRAME_CORNER_RADIUS", $arrval,
getDolGlobalInt(
'MAIN_PDF_FRAME_CORNER_RADIUS', 0));
533if (isModEnabled(
'project')) {
534 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_PROJECT").
'</td><td>';
535 $tmparray = array(
'no' =>
'No',
'showprojectref' =>
'RefProject',
'showprojectlabel' =>
'ShowProjectLabel');
537 print $form->selectarray(
'PDF_SHOW_PROJECT_REF_OR_LABEL', $tmparray, $showprojectref, 0, 0, 0,
'', 1);
542print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_CODE");
544if ($conf->use_javascript_ajax) {
545 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_CODE');
547 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
548 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_CODE'));
553print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE");
555if ($conf->use_javascript_ajax) {
556 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE');
558 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
559 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE'));
564print
'<tr class="oddeven"><td>'.$langs->trans(
"HideRefOnPDF").
'</td><td>';
565if ($conf->use_javascript_ajax) {
566 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF');
568 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF'), 1);
574if (isModEnabled(
'barcode')) {
575 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProductBarcodeOnPDF").
'</td><td>';
576 if ($conf->use_javascript_ajax) {
577 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE');
579 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE'), 1);
586print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDescOnPDF").
'</td><td>';
587if ($conf->use_javascript_ajax) {
588 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC');
590 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC'), 1);
596print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDetailsOnPDF").
'</td><td>';
597if ($conf->use_javascript_ajax) {
598 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS');
600 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS'), 1);
606print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldLabelOnPDF").
'</td><td>';
607if ($conf->use_javascript_ajax) {
608 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_LABEL');
610 print $form->selectyesno(
'PDF_BOLD_PRODUCT_LABEL',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_LABEL'), 1);
616print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldRefAndPeriodOnPDF").
'</td><td>';
617if ($conf->use_javascript_ajax) {
618 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD');
620 print $form->selectyesno(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD'), 1);
626print
'<tr class="oddeven"><td>'.$langs->trans(
"SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv(
"AssociatedProductsAbility"), $langs->transnoentitiesnoconv(
"Products")).
'</td><td>';
627if ($conf->use_javascript_ajax) {
628 print ajax_constantonoff(
'SHOW_SUBPRODUCT_REF_IN_PDF');
630 print $form->selectyesno(
'SHOW_SUBPRODUCT_REF_IN_PDF',
getDolGlobalInt(
'SHOW_SUBPRODUCT_REF_IN_PDF'), 1);
636print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowDetailsInPDFPageFoot").
'</td><td>';
637print $form->selectarray(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS',
'0'));
642print
'<tr class="oddeven"><td>'.$langs->trans(
"DOC_SHOW_FIRST_SALES_REP");
643print
' <span class="opacitymedium">('.$langs->trans(
"SalesRepresentativeInfo").
')</span>';
645if ($conf->use_javascript_ajax) {
646 print ajax_constantonoff(
'DOC_SHOW_FIRST_SALES_REP');
648 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
649 print $form->selectarray(
"DOC_SHOW_FIRST_SALES_REP", $arrval,
getDolGlobalString(
'DOC_SHOW_FIRST_SALES_REP'));
654print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT").
'</td><td>';
655if ($conf->use_javascript_ajax) {
656 print ajax_constantonoff(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT');
658 print $form->selectyesno(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
getDolGlobalInt(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT'), 1);
662print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_USE_A").
'</td><td>';
667print $form->selectarray(
'PDF_USE_A', $arraylistofpdfformat, $pdfa);
673print $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($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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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.