33require
'../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
51$langs->loadLangs(array(
'admin',
'companies',
'languages',
'members',
'other',
'products',
'stocks',
'trips'));
57$action =
GETPOST(
'action',
'aZ09');
58$cancel =
GETPOST(
'cancel',
'alpha');
69if ($action ==
'update') {
70 if (GETPOSTISSET(
'MAIN_PDF_FORMAT')) {
74 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_LEFT')) {
77 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_RIGHT')) {
80 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_TOP')) {
83 if (GETPOSTISSET(
'MAIN_PDF_MARGIN_BOTTOM')) {
87 if (GETPOSTISSET(
'MAIN_PROFID1_IN_ADDRESS')) {
90 if (GETPOSTISSET(
'MAIN_PROFID2_IN_ADDRESS')) {
93 if (GETPOSTISSET(
'MAIN_PROFID3_IN_ADDRESS')) {
96 if (GETPOSTISSET(
'MAIN_PROFID4_IN_ADDRESS')) {
99 if (GETPOSTISSET(
'MAIN_PROFID5_IN_ADDRESS')) {
102 if (GETPOSTISSET(
'MAIN_PROFID6_IN_ADDRESS')) {
106 if (GETPOSTISSET(
'MAIN_PDF_NO_SENDER_FRAME')) {
109 if (GETPOSTISSET(
'MAIN_PDF_NO_RECIPENT_FRAME')) {
117 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) {
121 if (GETPOSTISSET(
'MAIN_TVAINTRA_NOT_IN_ADDRESS')) {
125 if (isModEnabled(
'project')) {
126 if (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'no') {
129 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectref') {
132 } elseif (
GETPOST(
'PDF_SHOW_PROJECT_REF_OR_LABEL') ==
'showprojectlabel') {
138 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS')) {
141 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC')) {
144 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF')) {
148 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE')) {
149 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE"),
'chaine', 0,
'',
$conf->entity);
152 if (GETPOSTISSET(
'MAIN_DOCUMENTS_LOGO_HEIGHT')) {
155 if (GETPOSTISSET(
'MAIN_PDF_FRAME_CORNER_RADIUS')) {
158 if (GETPOSTISSET(
'MAIN_INVERT_SENDER_RECIPIENT')) {
161 if (GETPOSTISSET(
'MAIN_PDF_USE_ISO_LOCATION')) {
164 if (GETPOSTISSET(
'MAIN_PDF_NO_CUSTOMER_CODE')) {
168 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
169 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"),
'chaine', 0,
'',
$conf->entity);
172 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX')) {
175 if (GETPOSTISSET(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX')) {
179 if (GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE')) {
182 if (GETPOSTISSET(
'SHOW_SUBPRODUCT_REF_IN_PDF')) {
186 if (GETPOSTISSET(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT')) {
190 if (GETPOSTISSET(
'DOC_SHOW_FIRST_SALES_REP')) {
194 if (GETPOSTISSET(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) {
195 dolibarr_set_const($db,
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME",
GETPOST(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME',
'alpha'),
'chaine', 0,
'',
$conf->entity);
197 if (GETPOSTISSET(
'PDF_USE_A')) {
201 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_LABEL')) {
204 if (GETPOSTISSET(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD')) {
210 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
220$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
221llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf');
223$form =
new Form($db);
227$arraydetailsforpdffoot = array(
228 0 => $langs->transnoentitiesnoconv(
'NoDetails'),
229 1 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfo'),
230 2 => $langs->transnoentitiesnoconv(
'DisplayCompanyManagers'),
231 3 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfoAndManagers')
234$arraylistofpdfformat = array(
235 0 => $langs->transnoentitiesnoconv(
'PDF 1.7'),
236 1 => $langs->transnoentitiesnoconv(
'PDF/A-1b'),
237 3 => $langs->transnoentitiesnoconv(
'PDF/A-3b'),
240$s = $langs->trans(
"LibraryToBuildPDF").
"<br>";
243if (class_exists(
'FPDF') && !class_exists(
'TCPDF')) {
248 $s .=
' ('.@constant(
'FPDF_PATH').
')';
251if (class_exists(
'TCPDF')) {
256 $s .=
' ('.@constant(
'TCPDF_PATH').
')';
259if (class_exists(
'FPDI')) {
264 $s .=
' ('.@constant(
'FPDI_PATH').
')';
267if (class_exists(
'TCPDI')) {
272 $s .=
' ('.@constant(
'TCPDI_PATH').
')';
282print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFDesc"), $s).
"</span><br>\n";
285$noCountryCode = empty($mysoc->country_code);
287print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
288print
'<input type="hidden" name="token" value="'.newToken().
'">';
289print
'<input type="hidden" name="action" value="update">';
295 print
'<div class="warning">';
296 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";
297 print
"Also note that if an 'encrypted PDF' provides a protection against manual change done by mistake, it does NOT provide any protection against modification of your PDF in a security point of view: A protected PDF can still be modified by any advanced PDF editors. Don't forget this: If a software can read the PDF, this software can also rebuild it differently !\n";
298 print
'You should disable this option.';
308print
'<div class="div-table-responsive-no-min">';
309print
'<table summary="more" class="noborder centpercent">';
310print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
313if (empty($selected)) {
319print
'<tr class="oddeven"><td>'.$langs->trans(
"DictionaryPaperFormat").
'</td><td>';
320print $formadmin->select_paper_format($selected,
'MAIN_PDF_FORMAT');
323print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_LEFT").
'</td><td>';
324print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_LEFT', 10).
'">';
326print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_RIGHT").
'</td><td>';
327print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_RIGHT', 10).
'">';
329print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_TOP").
'</td><td>';
330print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_TOP', 10).
'">';
332print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_BOTTOM").
'</td><td>';
333print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_BOTTOM', 10).
'">';
345print
'<div class="div-table-responsive-no-min">';
346print
'<table summary="more" class="noborder centpercent">';
347print
'<tr class="liste_titre"><td class="">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
363print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowVATIntaInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
364if (
$conf->use_javascript_ajax) {
365 print ajax_constantonoff(
'MAIN_TVAINTRA_NOT_IN_ADDRESS');
367 print $form->selectyesno(
'MAIN_TVAINTRA_NOT_IN_ADDRESS',
getDolGlobalInt(
'MAIN_TVAINTRA_NOT_IN_ADDRESS'), 1);
372for ($i = 1; $i <= 6; $i++) {
373 if (!$noCountryCode) {
374 $pid = $langs->transcountry(
"ProfId".$i, $mysoc->country_code);
379 $pid =
img_warning().
' <span class="error">'.$langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CompanyCountry")).
'</span>';
382 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProfIdInAddress").
' - '.$pid.
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
383 $keyforconstant =
'MAIN_PROFID'.$i.
'_IN_ADDRESS';
384 if (
$conf->use_javascript_ajax) {
385 print ajax_constantonoff($keyforconstant);
387 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
393print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowLegalFormInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
394$keyforconstant =
'MAIN_LEGALFORM_IN_ADDRESS';
395if (
$conf->use_javascript_ajax) {
396 print ajax_constantonoff($keyforconstant);
398 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
405print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_SENDER_FRAME").
'</td><td>';
406if (
$conf->use_javascript_ajax) {
407 print ajax_constantonoff(
'MAIN_PDF_NO_SENDER_FRAME');
409 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
410 print $form->selectarray(
"MAIN_PDF_NO_SENDER_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_SENDER_FRAME'));
414print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_RECIPENT_FRAME").
'</td><td>';
415if (
$conf->use_javascript_ajax) {
416 print ajax_constantonoff(
'MAIN_PDF_NO_RECIPENT_FRAME');
418 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
419 print $form->selectarray(
"MAIN_PDF_NO_RECIPENT_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_RECIPENT_FRAME'));
425print
'<tr class="oddeven"><td>'.$langs->trans(
"SwapSenderAndRecipientOnPDF").
'</td><td>';
426if (
$conf->use_javascript_ajax) {
427 print ajax_constantonoff(
'MAIN_INVERT_SENDER_RECIPIENT');
429 print $form->selectyesno(
'MAIN_INVERT_SENDER_RECIPIENT',
getDolGlobalInt(
'MAIN_INVERT_SENDER_RECIPIENT'), 1);
435print
'<tr class="oddeven"><td>'.$langs->trans(
"PlaceCustomerAddressToIsoLocation").
'</td><td>';
436if (
$conf->use_javascript_ajax) {
437 print ajax_constantonoff(
'MAIN_PDF_USE_ISO_LOCATION');
439 print $form->selectyesno(
'MAIN_PDF_USE_ISO_LOCATION',
getDolGlobalInt(
'MAIN_PDF_USE_ISO_LOCATION'), 1);
444print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").
'</td><td>';
445if (
$conf->use_javascript_ajax) {
446 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"THIRDPARTY_ALIAS"),
'2' => $langs->trans(
"ALIAS_THIRDPARTY"));
447 print $form->selectarray(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval,
getDolGlobalInt(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME'));
460if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
461 if ($mysoc->useLocalTax(1)) {
462 $locales = $langs->transcountry(
"LT1", $mysoc->country_code);
463 $text =
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT1", $mysoc->country_code)).
'</td><td>';
464 if (
$conf->use_javascript_ajax) {
465 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX');
467 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX'), 1);
469 $text .=
'</td></tr>';
472 if ($mysoc->useLocalTax(2)) {
473 $locales .= ($locales ?
' & ' :
'').$langs->transcountry(
"LT2", $mysoc->country_code);
475 $text .=
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT2", $mysoc->country_code)).
'</td><td>';
476 if (
$conf->use_javascript_ajax) {
477 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX');
479 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX'), 1);
481 $text .=
'</td></tr>';
485$title = $langs->trans(
"PDFRulesForSalesTax");
486if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
487 $title .=
' - '.$langs->trans(
"PDFLocaltax", $locales);
493print
'<table summary="more" class="noborder centpercent">';
494print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
498print
'<tr class="oddeven"><td>'.$langs->trans(
"HideAnyVATInformationOnPDF").
'</td><td>';
499if (
$conf->use_javascript_ajax) {
500 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT');
502 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT'), 1);
517print
'<div class="div-table-responsive-no-min">';
518print
'<table summary="more" class="noborder centpercent">';
519print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
523print
'<tr class="oddeven"><td>';
524print $form->textwithpicto($langs->trans(
"PDFIn2Languages"), $langs->trans(
"PDF_USE_ALSO_LANGUAGE_CODE"));
526$selected = GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE') ?
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE') :
getDolGlobalString(
'PDF_USE_ALSO_LANGUAGE_CODE');
527print $formadmin->select_language($selected,
'PDF_USE_ALSO_LANGUAGE_CODE', 0, array(), 1);
531print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_DOCUMENTS_LOGO_HEIGHT").
'</td><td>';
532print
'<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" value="'.getDolGlobalInt(
'MAIN_DOCUMENTS_LOGO_HEIGHT', 20).
'">';
536print
'<tr class="oddeven"><td>';
537print $form->textwithpicto($langs->trans(
"PDFBoxFrameRoundedCorners"), $langs->trans(
"MAIN_PDF_FRAME_CORNER_RADIUS"));
539$arrval = array(
'0',
'1',
'2',
'3');
540print $form->selectarray(
"MAIN_PDF_FRAME_CORNER_RADIUS", $arrval,
getDolGlobalInt(
'MAIN_PDF_FRAME_CORNER_RADIUS', 0));
544if (isModEnabled(
'project')) {
545 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_PROJECT").
'</td><td>';
546 $tmparray = array(
'no' =>
'No',
'showprojectref' =>
'RefProject',
'showprojectlabel' =>
'ShowProjectLabel');
548 print $form->selectarray(
'PDF_SHOW_PROJECT_REF_OR_LABEL', $tmparray, $showprojectref, 0, 0, 0,
'', 1);
553print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_CODE");
555if (
$conf->use_javascript_ajax) {
556 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_CODE');
558 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
559 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_CODE'));
564print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE");
566if (
$conf->use_javascript_ajax) {
567 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE');
569 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
570 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE'));
575print
'<tr class="oddeven"><td>'.$langs->trans(
"HideRefOnPDF").
'</td><td>';
576if (
$conf->use_javascript_ajax) {
577 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF');
579 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF'), 1);
585if (isModEnabled(
'barcode')) {
586 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProductBarcodeOnPDF").
'</td><td>';
587 if (
$conf->use_javascript_ajax) {
588 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE');
590 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE'), 1);
597print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDescOnPDF").
'</td><td>';
598if (
$conf->use_javascript_ajax) {
599 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC');
601 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC'), 1);
607print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDetailsOnPDF").
'</td><td>';
608if (
$conf->use_javascript_ajax) {
609 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS');
611 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS'), 1);
617print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldLabelOnPDF").
'</td><td>';
618if (
$conf->use_javascript_ajax) {
619 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_LABEL');
621 print $form->selectyesno(
'PDF_BOLD_PRODUCT_LABEL',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_LABEL'), 1);
627print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldRefAndPeriodOnPDF").
'</td><td>';
628if (
$conf->use_javascript_ajax) {
629 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD');
631 print $form->selectyesno(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD'), 1);
637print
'<tr class="oddeven"><td>'.$langs->trans(
"SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv(
"AssociatedProductsAbility"), $langs->transnoentitiesnoconv(
"Products")).
'</td><td>';
638if (
$conf->use_javascript_ajax) {
639 print ajax_constantonoff(
'SHOW_SUBPRODUCT_REF_IN_PDF');
641 print $form->selectyesno(
'SHOW_SUBPRODUCT_REF_IN_PDF',
getDolGlobalInt(
'SHOW_SUBPRODUCT_REF_IN_PDF'), 1);
647print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowDetailsInPDFPageFoot").
'</td><td>';
648print $form->selectarray(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS',
'0'));
653print
'<tr class="oddeven"><td>'.$langs->trans(
"DOC_SHOW_FIRST_SALES_REP");
654print
' <span class="opacitymedium">('.$langs->trans(
"SalesRepresentativeInfo").
')</span>';
656if (
$conf->use_javascript_ajax) {
657 print ajax_constantonoff(
'DOC_SHOW_FIRST_SALES_REP');
659 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
660 print $form->selectarray(
"DOC_SHOW_FIRST_SALES_REP", $arrval,
getDolGlobalString(
'DOC_SHOW_FIRST_SALES_REP'));
665print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT").
'</td><td>';
666if (
$conf->use_javascript_ajax) {
667 print ajax_constantonoff(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT');
669 print $form->selectyesno(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
getDolGlobalInt(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT'), 1);
673print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_USE_A").
'</td><td>';
678print $form->selectarray(
'PDF_USE_A', $arraylistofpdfformat, $pdfa);
684print $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.
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_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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.