32 require_once DOL_DOCUMENT_ROOT.
'/core/modules/contract/modules_contract.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
36 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
67 public $update_main_doc_field;
78 public $version =
'dolibarr';
93 global $langs, $mysoc;
96 $this->
name =
'strato';
97 $this->
description = $langs->trans(
"StandardContractsTemplate");
98 $this->update_main_doc_field = 1;
104 $this->page_largeur = $formatarray[
'width'];
105 $this->page_hauteur = $formatarray[
'height'];
106 $this->format = array($this->page_largeur, $this->page_hauteur);
112 $this->option_logo = 1;
113 $this->option_tva = 0;
114 $this->option_modereg = 0;
115 $this->option_condreg = 0;
116 $this->option_multilang = 0;
117 $this->option_draft_watermark = 1;
120 $this->emetteur = $mysoc;
121 if (empty($this->emetteur->country_code)) {
122 $this->emetteur->country_code = substr($langs->defaultlang, -2);
126 $this->posxdesc = $this->marge_gauche + 1;
141 public function write_file(
$object, $outputlangs, $srctemplatepath =
'', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
144 global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
146 if (!is_object($outputlangs)) {
147 $outputlangs = $langs;
151 $outputlangs->charset_output =
'ISO-8859-1';
155 $outputlangs->loadLangs(array(
"main",
"dict",
"companies",
"contracts"));
162 global $outputlangsbis;
163 $outputlangsbis =
null;
165 $outputlangsbis =
new Translate(
'', $conf);
167 $outputlangsbis->loadLangs(array(
"main",
"dict",
"companies",
"bills",
"products",
"orders",
"deliveries"));
170 $nblines = count(
$object->lines);
172 if ($conf->contract->multidir_output[$conf->entity]) {
178 $file = $dir.
"/SPECIMEN.pdf";
182 $file = $dir.
"/".$objectref.
".pdf";
185 if (!file_exists($dir)) {
187 $this->error = $langs->transnoentitiesnoconv(
"ErrorCanNotCreateDir", $dir);
192 if (file_exists($dir)) {
194 if (!is_object($hookmanager)) {
195 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
198 $hookmanager->initHooks(array(
'pdfgeneration'));
199 $parameters = array(
'file' => $file,
'object' =>
$object,
'outputlangs' => $outputlangs);
201 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters,
$object, $action);
204 $nblines = (is_array(
$object->lines) ? count(
$object->lines) : 0);
209 $pdf->SetAutoPageBreak(1, 0);
211 $heightforinfotot = 50;
213 $heightforfooter = $this->marge_basse + 9;
215 $heightforfooter += 6;
218 if (class_exists(
'TCPDF')) {
219 $pdf->setPrintHeader(
false);
220 $pdf->setPrintFooter(
false);
225 $logodir = $conf->mycompany->dir_output;
226 if (!empty($conf->mycompany->multidir_output[
$object->entity])) {
227 $logodir = $conf->mycompany->multidir_output[
$object->entity];
229 $pagecount = $pdf->setSourceFile($logodir.
'/' .
getDolGlobalString(
'MAIN_ADD_PDF_BACKGROUND'));
230 $tplidx = $pdf->importPage(1);
235 $pdf->SetDrawColor(128, 128, 128);
237 $pdf->SetTitle($outputlangs->convToOutputCharset(
$object->ref));
238 $pdf->SetSubject($outputlangs->transnoentities(
"Contract"));
239 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
240 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
241 $pdf->SetKeyWords($outputlangs->convToOutputCharset(
$object->ref).
" ".$outputlangs->transnoentities(
"Contract").
" ".$outputlangs->convToOutputCharset(
$object->thirdparty->name));
243 $pdf->SetCompression(
false);
247 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
251 if (!empty($tplidx)) {
252 $pdf->useTemplate($tplidx);
255 $top_shift = $this->
_pagehead($pdf,
$object, 1, $outputlangs, (is_object($outputlangsbis) ? $outputlangsbis :
null));
256 $pdf->SetFont(
'',
'', $default_font_size - 1);
257 $pdf->MultiCell(0, 3,
'');
258 $pdf->SetTextColor(0, 0, 0);
261 $tab_top_newpage = (!
getDolGlobalInt(
'MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
264 if (!empty(
$object->note_public)) {
267 $pdf->SetFont(
'',
'', $default_font_size - 1);
269 $nexY = $pdf->GetY();
270 $height_note = $nexY - $tab_top;
273 $pdf->SetDrawColor(192, 192, 192);
274 $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
276 $tab_top = $nexY + 6;
279 $iniY = $tab_top + 7;
280 $curY = $tab_top + 7;
281 $nexY = $tab_top + 2;
283 $pdf->SetXY($this->marge_gauche, $tab_top);
285 $pdf->MultiCell(0, 2,
'');
287 $nblines = count(
$object->lines);
290 for ($i = 0; $i < $nblines; $i++) {
291 $objectligne =
$object->lines[$i];
293 $valide = $objectligne->id ? 1 : 0;
295 if ($valide > 0 ||
$object->specimen) {
296 $curX = $this->posxdesc - 1;
298 $pdf->SetFont(
'',
'', $default_font_size - 1);
299 $pdf->SetTextColor(0, 0, 0);
301 $pdf->setTopMargin($tab_top_newpage);
302 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext + $heightforinfotot);
303 $pageposbefore = $pdf->getPage();
307 if (!empty($objectligne->date_start)) {
308 $datei =
dol_print_date((
int) $objectligne->date_start,
'day',
false, $outputlangs,
true);
310 $datei = $langs->trans(
"Unknown");
313 if (!empty($objectligne->date_end)) {
314 $durationi =
convertSecondToTime((
int) $objectligne->date_end - (
int) $objectligne->date_start,
'allwithouthour');
315 $datee =
dol_print_date($objectligne->date_end,
'day',
false, $outputlangs,
true);
317 $durationi = $langs->trans(
"Unknown");
318 $datee = $langs->trans(
"Unknown");
321 if (!empty($objectligne->date_start_real)) {
322 $daters =
dol_print_date((
int) $objectligne->date_start_real,
'day',
false, $outputlangs,
true);
324 $daters = $langs->trans(
"Unknown");
327 if (!empty($objectligne->date_end_real)) {
328 $datere =
dol_print_date((
int) $objectligne->date_end_real,
'day',
false, $outputlangs,
true);
330 $datere = $langs->trans(
"Unknown");
333 $txtpredefinedservice = $objectligne->product_ref;
334 if ($objectligne->product_label) {
335 $txtpredefinedservice .=
' - ';
336 $txtpredefinedservice .= $objectligne->product_label;
342 $txt .= $outputlangs->transnoentities(
"Quantity") .
' : <strong>' . $objectligne->qty .
'</strong>';
345 $txt .=
' - ' . $outputlangs->transnoentities(
"UnitPrice") .
' : <strong>' .
price($objectligne->subprice) .
'</strong>';
349 $txt .= $outputlangs->transnoentities(
"DateStartPlannedShort").
" : <strong>".$datei.
"</strong> - ".$outputlangs->transnoentities(
"DateEndPlanned").
" : <strong>".$datee.
'</strong>';
353 $txt .= $outputlangs->transnoentities(
"DateStartRealShort").
" : <strong>".$daters.
'</strong>';
354 if (!empty($objectligne->date_end_real)) {
355 $txt .=
" - ".$outputlangs->transnoentities(
"DateEndRealShort").
" : <strong>".$datere.
'</strong>';
359 $pdf->startTransaction();
361 $pageposafter = $pdf->getPage();
362 if ($pageposafter > $pageposbefore) {
363 $pdf->rollbackTransaction(
true);
364 $pageposafter = $pageposbefore;
366 $pdf->setPageOrientation(
'', 1, $heightforfooter);
368 $pageposafter = $pdf->getPage();
369 $posyafter = $pdf->GetY();
370 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {
371 if ($i == ($nblines - 1)) {
372 $pdf->AddPage(
'',
'',
true);
373 if (!empty($tplidx)) {
374 $pdf->useTemplate($tplidx);
379 $pdf->setPage($pageposafter + 1);
386 $showpricebeforepagebreak = 1;
388 $showpricebeforepagebreak = 0;
392 $pdf->commitTransaction();
394 $posYAfterDescription = $pdf->GetY();
396 $nexY = $pdf->GetY() + 2;
397 $pageposafter = $pdf->getPage();
399 $pdf->setPage($pageposbefore);
400 $pdf->setTopMargin($this->marge_haute);
401 $pdf->setPageOrientation(
'', 1, 0);
404 if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
405 $pdf->setPage($pageposafter);
406 $curY = $tab_top_newpage;
409 $pdf->SetFont(
'',
'', $default_font_size - 1);
412 while ($pagenb < $pageposafter) {
413 $pdf->setPage($pagenb);
415 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1);
417 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1);
421 $pdf->setPage($pagenb);
422 $pdf->setPageOrientation(
'', 1, 0);
426 if (!empty($tplidx)) {
427 $pdf->useTemplate($tplidx);
431 if (isset(
$object->lines[$i + 1]->pagebreak) &&
$object->lines[$i + 1]->pagebreak) {
433 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1);
435 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1);
440 if (!empty($tplidx)) {
441 $pdf->useTemplate($tplidx);
451 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
452 $this->
tabSignature($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
453 $bottomlasttab = $this->page_hauteur - $heightforfooter - $heightforfooter + 1;
455 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
456 $this->
tabSignature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
457 $bottomlasttab = $this->page_hauteur - $heightforfooter - $heightforfooter + 1;
461 if (method_exists($pdf,
'AliasNbPages')) {
462 $pdf->AliasNbPages();
467 $pdf->Output($file,
'F');
470 $hookmanager->initHooks(array(
'pdfgeneration'));
471 $parameters = array(
'file' => $file,
'object' =>
$object,
'outputlangs' => $outputlangs);
473 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
475 $this->error = $hookmanager->error;
476 $this->errors = $hookmanager->errors;
481 $this->result = array(
'fullpath' => $file);
485 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
489 $this->error = $langs->transnoentities(
"ErrorConstantNotDefined",
"CONTRACT_OUTPUTDIR");
507 protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
546 $this->
printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 3);
557 protected function tabSignature(&$pdf, $tab_top, $tab_height, $outputlangs)
559 $pdf->SetDrawColor(128, 128, 128);
560 $posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite) / 2);
561 $posy = $tab_top + $tab_height + 3 + 3;
563 $pdf->SetXY($this->marge_gauche, $posy);
564 $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities(
"ContactNameAndSignature", $this->emetteur->name), 0,
'L', 0);
566 $pdf->SetXY($this->marge_gauche, $posy + 5);
567 $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20,
'', 1);
569 $pdf->SetXY($posmiddle + 5, $posy);
570 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities(
"ContactNameAndSignature", $this->recipient->name), 0,
'L', 0);
572 $pdf->SetXY($posmiddle + 5, $posy + 5);
573 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 20,
'', 1);
588 protected function _pagehead(&$pdf,
$object, $showaddress, $outputlangs, $outputlangsbis =
null, $titlekey =
"Contract")
596 if ($outputlangs->trans(
"DIRECTION") ==
'rtl') {
601 $outputlangs->loadLangs(array(
"main",
"dict",
"contract",
"companies"));
607 $pdf->SetTextColor(0, 0, 60);
608 $pdf->SetFont(
'',
'B', $default_font_size + 3);
612 $posy = $this->marge_haute;
613 $posx = $this->page_largeur - $this->marge_droite - $w;
615 $pdf->SetXY($this->marge_gauche, $posy);
619 if ($this->emetteur->logo) {
620 $logodir = $conf->mycompany->dir_output;
625 $logo = $logodir.
'/logos/thumbs/'.$this->emetteur->logo_small;
627 $logo = $logodir.
'/logos/'.$this->emetteur->logo;
629 if (is_readable($logo)) {
631 $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
633 $pdf->SetTextColor(200, 0, 0);
634 $pdf->SetFont(
'',
'B', $default_font_size - 2);
635 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"ErrorLogoFileNotFound", $logo), 0,
'L');
636 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"ErrorGoToGlobalSetup"), 0,
'L');
639 $text = $this->emetteur->name;
640 $pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
644 $pdf->SetFont(
'',
'B', $default_font_size + 3);
645 $pdf->SetXY($posx, $posy);
646 $pdf->SetTextColor(0, 0, 60);
647 $title = $outputlangs->transnoentities($titlekey);
648 $title .=
' '.$outputlangs->convToOutputCharset(
$object->ref);
649 if (
$object->statut == $object::STATUS_DRAFT) {
650 $pdf->SetTextColor(128, 0, 0);
651 $title .=
' - '.$outputlangs->transnoentities(
"NotValidated");
653 $pdf->MultiCell($w, 3, $title,
'',
'R');
655 $pdf->SetFont(
'',
'B', $default_font_size);
665 $pdf->SetFont(
'',
'', $default_font_size - 1);
668 $pdf->SetXY($posx, $posy);
669 $pdf->SetTextColor(0, 0, 60);
670 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"Date").
" : ".
dol_print_date(
$object->date_contrat,
"day",
false, $outputlangs,
true),
'',
'R');
674 $pdf->SetXY($posx, $posy);
675 $pdf->SetTextColor(0, 0, 60);
676 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"CustomerCode").
" : ".$outputlangs->transnoentities(
$object->thirdparty->code_client),
'',
'R');
681 $carac_emetteur =
'';
683 $arrayidcontact =
$object->getIdContact(
'internal',
'INTERREPFOLL');
684 if (count($arrayidcontact) > 0) {
685 $object->fetch_user($arrayidcontact[0]);
686 $labelbeforecontactname = ($outputlangs->transnoentities(
"FromContactName") !=
'FromContactName' ? $outputlangs->transnoentities(
"FromContactName") : $outputlangs->transnoentities(
"Name"));
687 $carac_emetteur .= ($carac_emetteur ?
"\n" :
'').$labelbeforecontactname.
": ".$outputlangs->convToOutputCharset(
$object->user->getFullName($outputlangs));
689 $carac_emetteur .= (
getDolGlobalInt(
'PDF_SHOW_PHONE_AFTER_USER_CONTACT') && !empty(
$object->user->office_phone)) ?
$object->user->office_phone :
'';
693 $carac_emetteur .=
"\n";
700 $posx = $this->marge_gauche;
702 $posx = $this->page_largeur - $this->marge_droite - 80;
708 $pdf->SetTextColor(0, 0, 0);
709 $pdf->SetFont(
'',
'', $default_font_size - 2);
710 $pdf->SetXY($posx, $posy - 5);
711 $pdf->SetXY($posx, $posy);
712 $pdf->SetFillColor(230, 230, 230);
713 $pdf->MultiCell(82, $hautcadre,
"", 0,
'R', 1);
714 $pdf->SetTextColor(0, 0, 60);
719 $pdf->SetXY($posx + 2, $posy + 3);
720 $pdf->SetTextColor(0, 0, 60);
721 $pdf->SetFont(
'',
'B', $default_font_size);
722 $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0,
'L');
723 $posy = $pdf->getY();
727 $pdf->SetXY($posx + 2, $posy);
728 $pdf->SetFont(
'',
'', $default_font_size - 1);
729 $pdf->MultiCell(80, 4, $carac_emetteur, 0,
'L');
734 $arrayidcontact =
$object->getIdContact(
'external',
'CUSTOMER');
735 if (count($arrayidcontact) > 0) {
737 $result =
$object->fetch_contact($arrayidcontact[0]);
740 $this->recipient =
$object->thirdparty;
743 if ($usecontact && (
$object->contact->socid !=
$object->thirdparty->id) && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) ||
getDolGlobalString(
'MAIN_USE_COMPANY_NAME_OF_CONTACT'))) {
744 $thirdparty =
$object->contact;
746 $thirdparty =
$object->thirdparty;
756 if ($this->page_largeur < 210) {
761 $posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
763 $posx = $this->marge_gauche;
768 $pdf->SetTextColor(0, 0, 0);
769 $pdf->SetFont(
'',
'', $default_font_size - 2);
770 $pdf->SetXY($posx + 2, $posy - 5);
771 $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
772 $pdf->SetTextColor(0, 0, 0);
776 $pdf->SetXY($posx + 2, $posy + 3);
777 $pdf->SetFont(
'',
'B', $default_font_size);
778 $pdf->MultiCell($widthrecbox, 4, $this->recipient->name, 0, $ltrdirection);
780 $posy = $pdf->getY();
783 $pdf->SetFont(
'',
'', $default_font_size - 1);
784 $pdf->SetXY($posx + 2, $posy);
786 $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
789 $pdf->SetTextColor(0, 0, 0);
806 $showdetails =
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
807 return pdf_pagefoot($pdf, $outputlangs,
'CONTRACT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur,
$object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
if($user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0)
Rect pdf.
Parent class to manage intervention document templates.
Class to manage translations.
Class to build contracts documents with model Strato.
write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build pdf onto disk.
tabSignature(&$pdf, $tab_top, $tab_height, $outputlangs)
Show footer signature of page.
_pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
Show footer of page.
_pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis=null, $titlekey="Contract")
Show top header of page.
__construct($db)
Constructor.
_tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0)
Show table for lines.
convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
print *****$script_file(".$version.") pid cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) if(!function_exists('str_starts_with')) if(!function_exists('str_ends_with')) if(!function_exists('str_contains')) getMultidirOutput($object, $module='', $forobject=0, $mode='output')
Return the full path of the directory where a module (or an object of a module) stores its files,...
dolChmod($filepath, $newmask='')
Change mod of a file.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_concatdesc($text1, $text2, $forxml=false, $invert=false)
Concat 2 descriptions with a new line between them (second operand after first one with appropriate n...
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
pdf_getPDFFontSize($outputlangs)
Return font size to use for PDF generation.
pdf_getFormat(Translate $outputlangs=null, $mode='setup')
Return array with format properties of default PDF format.
pdf_getHeightForLogo($logo, $url=false)
Return height to use for Logo onto PDF.
pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_basse, $marge_gauche, $page_hauteur, $object, $showdetails=0, $hidefreetext=0, $page_largeur=0, $watermark='')
Show footer of page for PDF generation.
pdf_pagehead(&$pdf, $outputlangs, $page_height)
Show header of page for PDF generation.
pdf_getPDFFont($outputlangs)
Return font name to use for PDF generation.
pdf_build_address($outputlangs, $sourcecompany, $targetcompany='', $targetcontact='', $usecontact=0, $mode='source', $object=null)
Return a string with full address formatted for output on PDF documents.
pdf_getInstance($format='', $metric='mm', $pagetype='P')
Return a PDF instance object.
pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias=0)
Returns the name of the thirdparty.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
$conf db name
Only used if Module[ID]Name translation string is not found.