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
'You should disable this option.';
307print
'<div class="div-table-responsive-no-min">';
308print
'<table summary="more" class="noborder centpercent">';
309print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
312if (empty($selected)) {
318print
'<tr class="oddeven"><td>'.$langs->trans(
"DictionaryPaperFormat").
'</td><td>';
319print $formadmin->select_paper_format($selected,
'MAIN_PDF_FORMAT');
322print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_LEFT").
'</td><td>';
323print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_LEFT', 10).
'">';
325print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_RIGHT").
'</td><td>';
326print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_RIGHT', 10).
'">';
328print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_TOP").
'</td><td>';
329print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_TOP', 10).
'">';
331print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_BOTTOM").
'</td><td>';
332print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_BOTTOM', 10).
'">';
344print
'<div class="div-table-responsive-no-min">';
345print
'<table summary="more" class="noborder centpercent">';
346print
'<tr class="liste_titre"><td class="">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
362print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowVATIntaInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
363if (
$conf->use_javascript_ajax) {
364 print ajax_constantonoff(
'MAIN_TVAINTRA_NOT_IN_ADDRESS');
366 print $form->selectyesno(
'MAIN_TVAINTRA_NOT_IN_ADDRESS',
getDolGlobalInt(
'MAIN_TVAINTRA_NOT_IN_ADDRESS'), 1);
371for ($i = 1; $i <= 6; $i++) {
372 if (!$noCountryCode) {
373 $pid = $langs->transcountry(
"ProfId".$i, $mysoc->country_code);
378 $pid =
img_warning().
' <span class="error">'.$langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CompanyCountry")).
'</span>';
381 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProfIdInAddress").
' - '.$pid.
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
382 $keyforconstant =
'MAIN_PROFID'.$i.
'_IN_ADDRESS';
383 if (
$conf->use_javascript_ajax) {
384 print ajax_constantonoff($keyforconstant);
386 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
392print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowLegalFormInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
393$keyforconstant =
'MAIN_LEGALFORM_IN_ADDRESS';
394if (
$conf->use_javascript_ajax) {
395 print ajax_constantonoff($keyforconstant);
397 print $form->selectyesno($keyforconstant,
getDolGlobalString($keyforconstant, 0), 1, $noCountryCode);
404print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_SENDER_FRAME").
'</td><td>';
405if (
$conf->use_javascript_ajax) {
406 print ajax_constantonoff(
'MAIN_PDF_NO_SENDER_FRAME');
408 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
409 print $form->selectarray(
"MAIN_PDF_NO_SENDER_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_SENDER_FRAME'));
413print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_RECIPENT_FRAME").
'</td><td>';
414if (
$conf->use_javascript_ajax) {
415 print ajax_constantonoff(
'MAIN_PDF_NO_RECIPENT_FRAME');
417 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
418 print $form->selectarray(
"MAIN_PDF_NO_RECIPENT_FRAME", $arrval,
getDolGlobalString(
'MAIN_PDF_NO_RECIPENT_FRAME'));
424print
'<tr class="oddeven"><td>'.$langs->trans(
"SwapSenderAndRecipientOnPDF").
'</td><td>';
425if (
$conf->use_javascript_ajax) {
426 print ajax_constantonoff(
'MAIN_INVERT_SENDER_RECIPIENT');
428 print $form->selectyesno(
'MAIN_INVERT_SENDER_RECIPIENT',
getDolGlobalInt(
'MAIN_INVERT_SENDER_RECIPIENT'), 1);
434print
'<tr class="oddeven"><td>'.$langs->trans(
"PlaceCustomerAddressToIsoLocation").
'</td><td>';
435if (
$conf->use_javascript_ajax) {
436 print ajax_constantonoff(
'MAIN_PDF_USE_ISO_LOCATION');
438 print $form->selectyesno(
'MAIN_PDF_USE_ISO_LOCATION',
getDolGlobalInt(
'MAIN_PDF_USE_ISO_LOCATION'), 1);
443print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").
'</td><td>';
444if (
$conf->use_javascript_ajax) {
445 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"THIRDPARTY_ALIAS"),
'2' => $langs->trans(
"ALIAS_THIRDPARTY"));
446 print $form->selectarray(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval,
getDolGlobalInt(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME'));
459if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
460 if ($mysoc->useLocalTax(1)) {
461 $locales = $langs->transcountry(
"LT1", $mysoc->country_code);
462 $text =
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT1", $mysoc->country_code)).
'</td><td>';
463 if (
$conf->use_javascript_ajax) {
464 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX');
466 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX'), 1);
468 $text .=
'</td></tr>';
471 if ($mysoc->useLocalTax(2)) {
472 $locales .= ($locales ?
' & ' :
'').$langs->transcountry(
"LT2", $mysoc->country_code);
474 $text .=
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT2", $mysoc->country_code)).
'</td><td>';
475 if (
$conf->use_javascript_ajax) {
476 $text .= ajax_constantonoff(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX');
478 $text .= $form->selectyesno(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX',
getDolGlobalInt(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX'), 1);
480 $text .=
'</td></tr>';
484$title = $langs->trans(
"PDFRulesForSalesTax");
485if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
486 $title .=
' - '.$langs->trans(
"PDFLocaltax", $locales);
492print
'<table summary="more" class="noborder centpercent">';
493print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
497print
'<tr class="oddeven"><td>'.$langs->trans(
"HideAnyVATInformationOnPDF").
'</td><td>';
498if (
$conf->use_javascript_ajax) {
499 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT');
501 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT'), 1);
516print
'<div class="div-table-responsive-no-min">';
517print
'<table summary="more" class="noborder centpercent">';
518print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
522print
'<tr class="oddeven"><td>';
523print $form->textwithpicto($langs->trans(
"PDFIn2Languages"), $langs->trans(
"PDF_USE_ALSO_LANGUAGE_CODE"));
525$selected = GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE') ?
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE') :
getDolGlobalString(
'PDF_USE_ALSO_LANGUAGE_CODE');
526print $formadmin->select_language($selected,
'PDF_USE_ALSO_LANGUAGE_CODE', 0, array(), 1);
530print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_DOCUMENTS_LOGO_HEIGHT").
'</td><td>';
531print
'<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" value="'.getDolGlobalInt(
'MAIN_DOCUMENTS_LOGO_HEIGHT', 20).
'">';
535print
'<tr class="oddeven"><td>';
536print $form->textwithpicto($langs->trans(
"PDFBoxFrameRoundedCorners"), $langs->trans(
"MAIN_PDF_FRAME_CORNER_RADIUS"));
538$arrval = array(
'0',
'1',
'2',
'3');
539print $form->selectarray(
"MAIN_PDF_FRAME_CORNER_RADIUS", $arrval,
getDolGlobalInt(
'MAIN_PDF_FRAME_CORNER_RADIUS', 0));
543if (isModEnabled(
'project')) {
544 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_PROJECT").
'</td><td>';
545 $tmparray = array(
'no' =>
'No',
'showprojectref' =>
'RefProject',
'showprojectlabel' =>
'ShowProjectLabel');
547 print $form->selectarray(
'PDF_SHOW_PROJECT_REF_OR_LABEL', $tmparray, $showprojectref, 0, 0, 0,
'', 1);
552print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_CODE");
554if (
$conf->use_javascript_ajax) {
555 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_CODE');
557 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
558 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_CODE'));
563print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE");
565if (
$conf->use_javascript_ajax) {
566 print ajax_constantonoff(
'MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE');
568 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
569 print $form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE", $arrval,
getDolGlobalString(
'MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE'));
574print
'<tr class="oddeven"><td>'.$langs->trans(
"HideRefOnPDF").
'</td><td>';
575if (
$conf->use_javascript_ajax) {
576 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF');
578 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF'), 1);
584if (isModEnabled(
'barcode')) {
585 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProductBarcodeOnPDF").
'</td><td>';
586 if (
$conf->use_javascript_ajax) {
587 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE');
589 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE'), 1);
596print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDescOnPDF").
'</td><td>';
597if (
$conf->use_javascript_ajax) {
598 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC');
600 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC'), 1);
606print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDetailsOnPDF").
'</td><td>';
607if (
$conf->use_javascript_ajax) {
608 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS');
610 print $form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS'), 1);
616print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldLabelOnPDF").
'</td><td>';
617if (
$conf->use_javascript_ajax) {
618 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_LABEL');
620 print $form->selectyesno(
'PDF_BOLD_PRODUCT_LABEL',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_LABEL'), 1);
626print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldRefAndPeriodOnPDF").
'</td><td>';
627if (
$conf->use_javascript_ajax) {
628 print ajax_constantonoff(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD');
630 print $form->selectyesno(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
getDolGlobalInt(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD'), 1);
636print
'<tr class="oddeven"><td>'.$langs->trans(
"SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv(
"AssociatedProductsAbility"), $langs->transnoentitiesnoconv(
"Products")).
'</td><td>';
637if (
$conf->use_javascript_ajax) {
638 print ajax_constantonoff(
'SHOW_SUBPRODUCT_REF_IN_PDF');
640 print $form->selectyesno(
'SHOW_SUBPRODUCT_REF_IN_PDF',
getDolGlobalInt(
'SHOW_SUBPRODUCT_REF_IN_PDF'), 1);
646print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowDetailsInPDFPageFoot").
'</td><td>';
647print $form->selectarray(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS',
'0'));
652print
'<tr class="oddeven"><td>'.$langs->trans(
"DOC_SHOW_FIRST_SALES_REP");
653print
' <span class="opacitymedium">('.$langs->trans(
"SalesRepresentativeInfo").
')</span>';
655if (
$conf->use_javascript_ajax) {
656 print ajax_constantonoff(
'DOC_SHOW_FIRST_SALES_REP');
658 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
659 print $form->selectarray(
"DOC_SHOW_FIRST_SALES_REP", $arrval,
getDolGlobalString(
'DOC_SHOW_FIRST_SALES_REP'));
664print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT").
'</td><td>';
665if (
$conf->use_javascript_ajax) {
666 print ajax_constantonoff(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT');
668 print $form->selectyesno(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
getDolGlobalInt(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT'), 1);
672print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_USE_A").
'</td><td>';
677print $form->selectarray(
'PDF_USE_A', $arraylistofpdfformat, $pdfa);
683print $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.
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.