29 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
35 require_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');
56 if ($action ==
'update') {
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);
109 dolibarr_set_const($db,
"MAIN_TVAINTRA_NOT_IN_ADDRESS",
GETPOST(
"MAIN_TVAINTRA_NOT_IN_ADDRESS"),
'chaine', 0,
'', $conf->entity);
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);
132 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_HIDE_REF",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_HIDE_REF"),
'chaine', 0,
'', $conf->entity);
136 dolibarr_set_const($db,
"MAIN_DOCUMENTS_LOGO_HEIGHT",
GETPOST(
"MAIN_DOCUMENTS_LOGO_HEIGHT",
'int'),
'chaine', 0,
'', $conf->entity);
139 dolibarr_set_const($db,
"MAIN_INVERT_SENDER_RECIPIENT",
GETPOST(
"MAIN_INVERT_SENDER_RECIPIENT"),
'chaine', 0,
'', $conf->entity);
142 dolibarr_set_const($db,
"MAIN_PDF_USE_ISO_LOCATION",
GETPOST(
"MAIN_PDF_USE_ISO_LOCATION"),
'chaine', 0,
'', $conf->entity);
145 dolibarr_set_const($db,
"MAIN_PDF_NO_CUSTOMER_CODE",
GETPOST(
"MAIN_PDF_NO_CUSTOMER_CODE"),
'chaine', 0,
'', $conf->entity);
148 if (
GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) {
149 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"),
'chaine', 0,
'', $conf->entity);
153 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_SECOND_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_SECOND_TAX"),
'chaine', 0,
'', $conf->entity);
156 dolibarr_set_const($db,
"MAIN_PDF_MAIN_HIDE_THIRD_TAX",
GETPOST(
"MAIN_PDF_MAIN_HIDE_THIRD_TAX"),
'chaine', 0,
'', $conf->entity);
160 dolibarr_set_const($db,
"PDF_USE_ALSO_LANGUAGE_CODE",
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE',
'alpha'),
'chaine', 0,
'', $conf->entity);
163 dolibarr_set_const($db,
"SHOW_SUBPRODUCT_REF_IN_PDF",
GETPOST(
'SHOW_SUBPRODUCT_REF_IN_PDF',
'alpha'),
'chaine', 0,
'', $conf->entity);
167 dolibarr_set_const($db,
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT",
GETPOST(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT',
'alpha'),
'chaine', 0,
'', $conf->entity);
171 dolibarr_set_const($db,
"DOC_SHOW_FIRST_SALES_REP",
GETPOST(
'DOC_SHOW_FIRST_SALES_REP',
'alpha'),
'chaine', 0,
'', $conf->entity);
174 if (
GETPOSTISSET(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) {
175 dolibarr_set_const($db,
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME",
GETPOST(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME',
'alpha'),
'chaine', 0,
'', $conf->entity);
182 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_LABEL",
GETPOST(
'PDF_BOLD_PRODUCT_LABEL',
'alpha'),
'chaine', 0,
'', $conf->entity);
185 dolibarr_set_const($db,
"PDF_BOLD_PRODUCT_REF_AND_PERIOD",
GETPOST(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD',
'alpha'),
'chaine', 0,
'', $conf->entity);
190 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
200 $wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
207 $arraydetailsforpdffoot = array(
208 0 => $langs->transnoentitiesnoconv(
'NoDetails'),
209 1 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfo'),
210 2 => $langs->transnoentitiesnoconv(
'DisplayCompanyManagers'),
211 3 => $langs->transnoentitiesnoconv(
'DisplayCompanyInfoAndManagers')
214 $arraylistofpdfformat = array(
215 0 => $langs->transnoentitiesnoconv(
'PDF 1.7'),
216 1 => $langs->transnoentitiesnoconv(
'PDF/A-1b'),
217 3 => $langs->transnoentitiesnoconv(
'PDF/A-3b'),
220 $s = $langs->trans(
"LibraryToBuildPDF").
"<br>";
223 if (class_exists(
'FPDF') && !class_exists(
'TCPDF')) {
228 $s .=
' ('.@constant(
'FPDF_PATH').
')';
231 if (class_exists(
'TCPDF')) {
236 $s .=
' ('.@constant(
'TCPDF_PATH').
')';
239 if (class_exists(
'FPDI')) {
244 $s .=
' ('.@constant(
'FPDI_PATH').
')';
247 if (class_exists(
'TCPDI')) {
252 $s .=
' ('.@constant(
'TCPDI_PATH').
')';
262 print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFDesc"), $s).
"</span><br>\n";
265 $noCountryCode = (empty($mysoc->country_code) ? true :
false);
267 print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
268 print
'<input type="hidden" name="token" value="'.newToken().
'">';
269 print
'<input type="hidden" name="action" value="update">';
277 print
'<div class="div-table-responsive-no-min">';
278 print
'<table summary="more" class="noborder centpercent">';
279 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
281 $selected = (isset($conf->global->MAIN_PDF_FORMAT) ? $conf->global->MAIN_PDF_FORMAT :
'');
282 if (empty($selected)) {
288 print
'<tr class="oddeven"><td>'.$langs->trans(
"DictionaryPaperFormat").
'</td><td>';
289 print $formadmin->select_paper_format($selected,
'MAIN_PDF_FORMAT');
292 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_LEFT").
'</td><td>';
293 print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_LEFT', 10).
'">';
295 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_RIGHT").
'</td><td>';
296 print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_RIGHT', 10).
'">';
298 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_TOP").
'</td><td>';
299 print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_TOP', 10).
'">';
301 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_MARGIN_BOTTOM").
'</td><td>';
302 print
'<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.getDolGlobalInt(
'MAIN_PDF_MARGIN_BOTTOM', 10).
'">';
314 print
'<div class="div-table-responsive-no-min">';
315 print
'<table summary="more" class="noborder centpercent">';
316 print
'<tr class="liste_titre"><td class="">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
332 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowVATIntaInAddress").
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
333 if ($conf->use_javascript_ajax) {
336 print
$form->selectyesno(
'MAIN_TVAINTRA_NOT_IN_ADDRESS', (!empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS)) ? $conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS : 0, 1);
341 for ($i = 1; $i <= 6; $i++) {
342 if (!$noCountryCode) {
343 $pid = $langs->transcountry(
"ProfId".$i, $mysoc->country_code);
348 $pid =
img_warning().
' <span class="error">'.$langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CompanyCountry")).
'</span>';
351 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowProfIdInAddress").
' - '.$pid.
' - <span class="opacitymedium">'.$langs->trans(
"ThirdPartyAddress").
'</span></td><td>';
352 $keyforconstant =
'MAIN_PROFID'.$i.
'_IN_ADDRESS';
353 if ($conf->use_javascript_ajax) {
356 print
$form->selectyesno($keyforconstant, isset($conf->global->$keyforconstant) ? $conf->global->$keyforconstant : 0, 1, $noCountryCode);
364 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_SENDER_FRAME").
'</td><td>';
365 if ($conf->use_javascript_ajax) {
368 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
369 print
$form->selectarray(
"MAIN_PDF_NO_SENDER_FRAME", $arrval, $conf->global->MAIN_PDF_NO_SENDER_FRAME);
373 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_NO_RECIPENT_FRAME").
'</td><td>';
374 if ($conf->use_javascript_ajax) {
377 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
378 print
$form->selectarray(
"MAIN_PDF_NO_RECIPENT_FRAME", $arrval, $conf->global->MAIN_PDF_NO_RECIPENT_FRAME);
384 print
'<tr class="oddeven"><td>'.$langs->trans(
"SwapSenderAndRecipientOnPDF").
'</td><td>';
385 if ($conf->use_javascript_ajax) {
388 print
$form->selectyesno(
'MAIN_INVERT_SENDER_RECIPIENT', (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) ? $conf->global->MAIN_INVERT_SENDER_RECIPIENT : 0, 1);
394 print
'<tr class="oddeven"><td>'.$langs->trans(
"PlaceCustomerAddressToIsoLocation").
'</td><td>';
395 if ($conf->use_javascript_ajax) {
398 print
$form->selectyesno(
'MAIN_PDF_USE_ISO_LOCATION', (!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION)) ? $conf->global->MAIN_PDF_USE_ISO_LOCATION : 0, 1);
403 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").
'</td><td>';
404 if ($conf->use_javascript_ajax) {
405 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"THIRDPARTY_ALIAS"),
'2' => $langs->trans(
"ALIAS_THIRDPARTY"));
406 print
$form->selectarray(
"PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval,
getDolGlobalInt(
'PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME'));
419 if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
420 if ($mysoc->useLocalTax(1)) {
421 $locales = $langs->transcountry(
"LT1", $mysoc->country_code);
422 $text =
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT1", $mysoc->country_code)).
'</td><td>';
423 if ($conf->use_javascript_ajax) {
426 $text .=
$form->selectyesno(
'MAIN_PDF_MAIN_HIDE_SECOND_TAX', (!empty($conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX)) ? $conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX : 0, 1);
428 $text .=
'</td></tr>';
431 if ($mysoc->useLocalTax(2)) {
432 $locales .= ($locales ?
' & ' :
'').$langs->transcountry(
"LT2", $mysoc->country_code);
434 $text .=
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"HideLocalTaxOnPDF", $langs->transcountry(
"LT2", $mysoc->country_code)).
'</td><td>';
435 if ($conf->use_javascript_ajax) {
438 $text .=
$form->selectyesno(
'MAIN_PDF_MAIN_HIDE_THIRD_TAX', (!empty($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX)) ? $conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX : 0, 1);
440 $text .=
'</td></tr>';
444 $title = $langs->trans(
"PDFRulesForSalesTax");
445 if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) {
446 $title .=
' - '.$langs->trans(
"PDFLocaltax", $locales);
452 print
'<table summary="more" class="noborder centpercent">';
453 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
457 print
'<tr class="oddeven"><td>'.$langs->trans(
"HideAnyVATInformationOnPDF").
'</td><td>';
458 if ($conf->use_javascript_ajax) {
461 print
$form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT', (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) ? $conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT : 0, 1);
476 print
'<div class="div-table-responsive-no-min">';
477 print
'<table summary="more" class="noborder centpercent">';
478 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
482 print
'<tr class="oddeven"><td>';
483 print
$form->textwithpicto($langs->trans(
"PDFIn2Languages"), $langs->trans(
"PDF_USE_ALSO_LANGUAGE_CODE"));
485 $selected =
GETPOSTISSET(
'PDF_USE_ALSO_LANGUAGE_CODE') ?
GETPOST(
'PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0);
486 print $formadmin->select_language($selected,
'PDF_USE_ALSO_LANGUAGE_CODE', 0,
null, 1);
490 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_DOCUMENTS_LOGO_HEIGHT").
'</td><td>';
491 print
'<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" value="'.(!empty($conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT) ? $conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT : 20).
'">';
496 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_PROJECT").
'</td><td>';
497 $tmparray = array(
'no' =>
'No',
'showprojectref' =>
'RefProject',
'showprojectlabel' =>
'ShowProjectLabel');
498 $showprojectref = empty($conf->global->PDF_SHOW_PROJECT) ? (empty($conf->global->PDF_SHOW_PROJECT_TITLE) ?
'no' :
'showprojectlabel') :
'showprojectref';
499 print
$form->selectarray(
'PDF_SHOW_PROJECT_REF_OR_LABEL', $tmparray, $showprojectref, 0, 0, 0,
'', 1);
505 print
'<tr class="oddeven"><td>'.$langs->trans(
"MAIN_PDF_HIDE_CUSTOMER_CODE");
507 if ($conf->use_javascript_ajax) {
510 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
511 print
$form->selectarray(
"MAIN_PDF_HIDE_CUSTOMER_CODE", $arrval, $conf->global->MAIN_PDF_HIDE_CUSTOMER_CODE);
517 print
'<tr class="oddeven"><td>'.$langs->trans(
"HideRefOnPDF").
'</td><td>';
518 if ($conf->use_javascript_ajax) {
521 print
$form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_REF', (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF)) ? $conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF : 0, 1);
527 print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDescOnPDF").
'</td><td>';
528 if ($conf->use_javascript_ajax) {
531 print
$form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DESC', (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC)) ? $conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC : 0, 1);
537 print
'<tr class="oddeven"><td>'.$langs->trans(
"HideDetailsOnPDF").
'</td><td>';
538 if ($conf->use_javascript_ajax) {
541 print
$form->selectyesno(
'MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS', (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS)) ? $conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS : 0, 1);
547 print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldLabelOnPDF").
'</td><td>';
548 if ($conf->use_javascript_ajax) {
551 print
$form->selectyesno(
'PDF_BOLD_PRODUCT_LABEL', (!empty($conf->global->PDF_BOLD_PRODUCT_LABEL)) ? $conf->global->PDF_BOLD_PRODUCT_LABEL : 0, 1);
557 print
'<tr class="oddeven"><td>'.$langs->trans(
"BoldRefAndPeriodOnPDF").
'</td><td>';
558 if ($conf->use_javascript_ajax) {
561 print
$form->selectyesno(
'PDF_BOLD_PRODUCT_REF_AND_PERIOD', (!empty($conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD)) ? $conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD : 0, 1);
567 print
'<tr class="oddeven"><td>'.$langs->trans(
"SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv(
"AssociatedProductsAbility"), $langs->transnoentitiesnoconv(
"Products")).
'</td><td>';
568 if ($conf->use_javascript_ajax) {
571 print
$form->selectyesno(
'SHOW_SUBPRODUCT_REF_IN_PDF', (!empty($conf->global->SHOW_SUBPRODUCT_REF_IN_PDF)) ? $conf->global->SHOW_SUBPRODUCT_REF_IN_PDF : 0, 1);
577 print
'<tr class="oddeven"><td>'.$langs->trans(
"ShowDetailsInPDFPageFoot").
'</td><td>';
578 print
$form->selectarray(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS : 0));
583 print
'<tr class="oddeven"><td>'.$langs->trans(
"DOC_SHOW_FIRST_SALES_REP");
584 print
' <span class="opacitymedium">('.$langs->trans(
"SalesRepresentativeInfo").
')</span>';
586 if ($conf->use_javascript_ajax) {
589 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
590 print
$form->selectarray(
"DOC_SHOW_FIRST_SALES_REP", $arrval, $conf->global->DOC_SHOW_FIRST_SALES_REP);
595 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_SHOW_LINK_TO_ONLINE_PAYMENT").
'</td><td>';
596 if ($conf->use_javascript_ajax) {
599 print
$form->selectyesno(
'PDF_SHOW_LINK_TO_ONLINE_PAYMENT', (!empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT)) ? $conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT : 0, 1);
603 print
'<tr class="oddeven"><td>'.$langs->trans(
"PDF_USE_A").
'</td><td>';
604 print
$form->selectarray(
'PDF_USE_A', $arraylistofpdfformat, (empty($conf->global->PDF_USE_A) ? 0 : $conf->global->PDF_USE_A));
610 print
$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($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0, $setzeroinsteadofdel=0, $suffix='', $mode='', $morecss='')
On/off button for constant.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_getDefaultFormat(Translate $outputlangs=null)
Try to guess default paper format according to language into $langs.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
getDolGlobalInt($key, $default=0)
Return 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.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
isModEnabled($module)
Is Dolibarr module enabled.
pdf_admin_prepare_head()
Return array head with list of tabs to view object informations.
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.