174 public function write_file($object, $outputlangs, $srctemplatepath =
'', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
177 global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
180 dol_syslog(
"write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang :
'null'));
182 if (!is_object($outputlangs)) {
183 $outputlangs = $langs;
186 if (!empty($conf->global->MAIN_USE_FPDF)) {
187 $outputlangs->charset_output =
'ISO-8859-1';
191 $outputlangs->loadLangs(array(
"main",
"bills",
"products",
"dict",
"companies"));
193 if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
194 global $outputlangsbis;
195 $outputlangsbis =
new Translate(
'', $conf);
196 $outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
197 $outputlangsbis->loadLangs(array(
"main",
"bills",
"products",
"dict",
"companies"));
200 $nblines = (is_array($object->lines) ? count($object->lines) : 0);
203 if (!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)) {
204 $hidetop = $conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE;
208 $realpatharray = array();
209 $this->atleastonephoto =
false;
264 if ($conf->recruitment->dir_output.
'/recruitmentjobposition') {
265 $object->fetch_thirdparty();
268 if ($object->specimen) {
269 $dir = $conf->recruitment->dir_output.
'/recruitmentjobposition';
270 $file = $dir.
"/SPECIMEN.pdf";
273 $dir = $conf->recruitment->dir_output.
'/recruitmentjobposition/'.$objectref;
274 $file = $dir.
"/".$objectref.
".pdf";
276 if (!file_exists($dir)) {
278 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
283 if (file_exists($dir)) {
285 $hookmanager->initHooks(array(
'pdfgeneration'));
286 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
287 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters, $object, $action);
290 $nblines = (is_array($object->lines) ? count($object->lines) : 0);
295 $pdf->SetAutoPageBreak(1, 0);
297 $heightforinfotot = 50;
298 $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5);
299 $heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22);
301 if (class_exists(
'TCPDF')) {
302 $pdf->setPrintHeader(
false);
303 $pdf->setPrintFooter(
false);
308 if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
309 $logodir = $conf->mycompany->dir_output;
310 if (!empty($conf->mycompany->multidir_output[$object->entity])) {
311 $logodir = $conf->mycompany->multidir_output[$object->entity];
313 $pagecount = $pdf->setSourceFile($logodir.
'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
314 $tplidx = $pdf->importPage(1);
319 $pdf->SetDrawColor(128, 128, 128);
321 $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
322 $pdf->SetSubject($object->label);
323 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
324 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
325 $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref).
" ".$object->label.
" ".$outputlangs->convToOutputCharset($object->thirdparty->name));
327 $pdf->SetCompression(
false);
331 $cert = empty($user->conf->CERTIFICATE_CRT) ?
'' : $user->conf->CERTIFICATE_CRT;
334 $cert = empty($conf->global->CERTIFICATE_CRT) ?
'' : $conf->global->CERTIFICATE_CRT;
339 'Name' => $this->emetteur->name,
340 'Location' =>
getCountry($this->emetteur->country_code, 0),
341 'Reason' =>
'MYOBJECT',
342 'ContactInfo' => $this->emetteur->email
344 $pdf->setSignature($cert, $cert, $this->emetteur->name,
'', 2, $info);
347 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
351 if (!empty($tplidx)) {
352 $pdf->useTemplate($tplidx);
356 $top_shift = $this->
_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis);
357 $pdf->SetFont(
'',
'', $default_font_size - 1);
358 $pdf->MultiCell(0, 3,
'');
359 $pdf->SetTextColor(0, 0, 0);
361 $tab_top = 90 + $top_shift;
362 $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
363 $tab_height = 130 - $top_shift;
364 $tab_height_newpage = 150;
365 if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
366 $tab_height_newpage -= $top_shift;
369 $nexY = $tab_top - 1;
372 $notetoshow = empty($object->note_public) ?
'' : $object->note_public;
374 $extranote = $this->getExtrafieldsInHtml($object, $outputlangs);
375 if (!empty($extranote)) {
379 $pagenb = $pdf->getPage();
383 $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
384 $pageposbeforenote = $pagenb;
391 $pdf->startTransaction();
393 $pdf->SetFont(
'',
'', $default_font_size - 1);
394 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top,
dol_htmlentitiesbr($notetoshow), 0, 1);
396 $pageposafternote = $pdf->getPage();
397 $posyafter = $pdf->GetY();
399 if ($pageposafternote > $pageposbeforenote) {
400 $pdf->rollbackTransaction(
true);
403 while ($pagenb < $pageposafternote) {
406 if (!empty($tplidx)) {
407 $pdf->useTemplate($tplidx);
409 if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
410 $this->
_pagehead($pdf, $object, 0, $outputlangs);
413 $pdf->setTopMargin($tab_top_newpage);
415 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext);
419 $pdf->setPage($pageposbeforenote);
420 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext);
421 $pdf->SetFont(
'',
'', $default_font_size - 1);
422 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top,
dol_htmlentitiesbr($notetoshow), 0, 1);
423 $pageposafternote = $pdf->getPage();
425 $posyafter = $pdf->GetY();
427 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
428 $pdf->AddPage(
'',
'',
true);
431 $pdf->setPage($pageposafternote);
432 $pdf->setTopMargin($tab_top_newpage);
434 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext);
440 $i = $pageposbeforenote;
441 while ($i < $pageposafternote) {
445 $pdf->SetDrawColor(128, 128, 128);
447 if ($i > $pageposbeforenote) {
448 $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
449 $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
451 $height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
452 $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
456 $pdf->setPageOrientation(
'', 1, 0);
457 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
463 $pdf->setPage($pageposafternote);
464 if (!empty($tplidx)) {
465 $pdf->useTemplate($tplidx);
467 if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
468 $this->
_pagehead($pdf, $object, 0, $outputlangs);
470 $height_note = $posyafter - $tab_top_newpage;
471 $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
474 $pdf->commitTransaction();
475 $posyafter = $pdf->GetY();
476 $height_note = $posyafter - $tab_top;
477 $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
479 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
481 $pdf->AddPage(
'',
'',
true);
484 $pdf->setPage($pageposafternote);
485 if (!empty($tplidx)) {
486 $pdf->useTemplate($tplidx);
488 if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
489 $this->
_pagehead($pdf, $object, 0, $outputlangs);
492 $posyafter = $tab_top_newpage;
496 $tab_height = $tab_height - $height_note;
497 $tab_top = $posyafter + 6;
506 $pdf->startTransaction();
507 $this->
pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
508 $pdf->rollbackTransaction(
true);
510 $nexY = $tab_top + $this->tabTitleHeight;
513 $pageposbeforeprintlines = $pdf->getPage();
514 $pagenb = $pageposbeforeprintlines;
515 for ($i = 0; $i < $nblines; $i++) {
517 $pdf->SetFont(
'',
'', $default_font_size - 1);
518 $pdf->SetTextColor(0, 0, 0);
521 $imglinesize = array();
522 if (!empty($realpatharray[$i])) {
526 $pdf->setTopMargin($tab_top_newpage);
527 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext + $heightforinfotot);
528 $pageposbefore = $pdf->getPage();
530 $showpricebeforepagebreak = 1;
535 if (isset($imglinesize[
'width']) && isset($imglinesize[
'height']) && ($curY + $imglinesize[
'height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {
536 $pdf->AddPage(
'',
'',
true);
537 if (!empty($tplidx)) {
538 $pdf->useTemplate($tplidx);
540 $pdf->setPage($pageposbefore + 1);
542 $curY = $tab_top_newpage;
545 if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) {
546 $showpricebeforepagebreak = 1;
548 $showpricebeforepagebreak = 0;
552 if (!empty($this->cols[
'photo']) && isset($imglinesize[
'width']) && isset($imglinesize[
'height'])) {
553 $pdf->Image($realpatharray[$i], $this->
getColumnContentXStart(
'photo'), $curY, $imglinesize[
'width'], $imglinesize[
'height'],
'',
'',
'', 2, 300);
555 $posYAfterImage = $curY + $imglinesize[
'height'];
561 $pdf->startTransaction();
563 $this->
printColDescContent($pdf, $curY,
'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
564 $pageposafter = $pdf->getPage();
566 if ($pageposafter > $pageposbefore) {
567 $pdf->rollbackTransaction(
true);
568 $pdf->setPageOrientation(
'', 1, $heightforfooter);
570 $this->
printColDescContent($pdf, $curY,
'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
572 $pageposafter = $pdf->getPage();
573 $posyafter = $pdf->GetY();
576 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {
577 if ($i == ($nblines - 1)) {
578 $pdf->AddPage(
'',
'',
true);
579 if (!empty($tplidx)) {
580 $pdf->useTemplate($tplidx);
582 $pdf->setPage($pageposafter + 1);
587 if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) {
588 $showpricebeforepagebreak = 1;
590 $showpricebeforepagebreak = 0;
595 $pdf->commitTransaction();
599 $nexY = $pdf->GetY();
600 $pageposafter = $pdf->getPage();
601 $pdf->setPage($pageposbefore);
602 $pdf->setTopMargin($this->marge_haute);
603 $pdf->setPageOrientation(
'', 1, 0);
606 if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
607 $pdf->setPage($pageposafter); $curY = $tab_top_newpage;
610 $pdf->SetFont(
'',
'', $default_font_size - 1);
620 'outputlangs' => $outputlangs,
621 'hidedetails' => $hidedetails
623 $reshook = $hookmanager->executeHooks(
'printPDFline', $parameters, $this);
628 while ($pagenb < $pageposafter) {
629 $pdf->setPage($pagenb);
630 if ($pagenb == $pageposbeforeprintlines) {
631 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
633 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
635 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
637 $pdf->setPage($pagenb);
638 $pdf->setPageOrientation(
'', 1, 0);
639 if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
640 $this->
_pagehead($pdf, $object, 0, $outputlangs);
642 if (!empty($tplidx)) {
643 $pdf->useTemplate($tplidx);
647 if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
648 if ($pagenb == $pageposafter) {
649 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
651 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
653 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
656 if (!empty($tplidx)) {
657 $pdf->useTemplate($tplidx);
660 if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
661 $this->
_pagehead($pdf, $object, 0, $outputlangs);
667 if ($pagenb == $pageposbeforeprintlines) {
668 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis);
669 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
671 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis);
672 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
690 $this->
_pagefoot($pdf, $object, $outputlangs);
691 if (method_exists($pdf,
'AliasNbPages')) {
692 $pdf->AliasNbPages();
697 $pdf->Output($file,
'F');
700 $hookmanager->initHooks(array(
'pdfgeneration'));
701 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
703 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
705 $this->error = $hookmanager->error;
706 $this->errors = $hookmanager->errors;
711 $this->result = array(
'fullpath'=>$file);
715 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
719 $this->error = $langs->transnoentities(
"ErrorConstantNotDefined",
"FAC_OUTPUTDIR");
802 protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis =
null)
804 global $conf, $langs;
807 $outputlangs->loadLangs(array(
"main",
"bills",
"propal",
"companies"));
814 if ($object->statut == $object::STATUS_DRAFT &&
getDolGlobalString(
'RECRUITMENT_RECRUITMENTJOBPOSITION_DRAFT_WATERMARK')) {
815 pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur,
'mm',
getDolGlobalString(
'RECRUITMENT_RECRUITMENTJOBPOSITION_DRAFT_WATERMARK'));
818 $pdf->SetTextColor(0, 0, 60);
819 $pdf->SetFont(
'',
'B', $default_font_size + 3);
823 $posy = $this->marge_haute;
824 $posx = $this->page_largeur - $this->marge_droite - $w;
826 $pdf->SetXY($this->marge_gauche, $posy);
830 if ($this->emetteur->logo) {
831 $logodir = $conf->mycompany->dir_output;
832 if (!empty($conf->mycompany->multidir_output[$object->entity])) {
833 $logodir = $conf->mycompany->multidir_output[$object->entity];
836 $logo = $logodir.
'/logos/thumbs/'.$this->emetteur->logo_small;
838 $logo = $logodir.
'/logos/'.$this->emetteur->logo;
840 if (is_readable($logo)) {
842 $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
844 $pdf->SetTextColor(200, 0, 0);
845 $pdf->SetFont(
'',
'B', $default_font_size - 2);
846 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"ErrorLogoFileNotFound", $logo), 0,
'L');
847 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"ErrorGoToGlobalSetup"), 0,
'L');
850 $text = $this->emetteur->name;
851 $pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0,
'L');
855 $pdf->SetFont(
'',
'B', $default_font_size + 3);
856 $pdf->SetXY($posx, $posy);
857 $pdf->SetTextColor(0, 0, 60);
858 $title = $object->label;
863 $pdf->MultiCell($w, 3, $title,
'',
'R');
865 $pdf->SetFont(
'',
'B', $default_font_size);
868 $pdf->SetXY($posx, $posy);
869 $pdf->SetTextColor(0, 0, 60);
870 $textref = $outputlangs->transnoentities(
"Ref").
" : ".$outputlangs->convToOutputCharset($object->ref);
871 if ($object->statut == $object::STATUS_DRAFT) {
872 $pdf->SetTextColor(128, 0, 0);
873 $textref .=
' - '.$outputlangs->transnoentities(
"NotValidated");
875 $pdf->MultiCell($w, 4, $textref,
'',
'R');
878 $pdf->SetFont(
'',
'', $default_font_size - 2);
880 if ($object->ref_client) {
882 $pdf->SetXY($posx, $posy);
883 $pdf->SetTextColor(0, 0, 60);
884 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"RefCustomer").
" : ".
dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65),
'',
'R');
887 if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) {
888 $object->fetch_projet();
889 if (!empty($object->project->ref)) {
891 $pdf->SetXY($posx, $posy);
892 $pdf->SetTextColor(0, 0, 60);
893 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"Project").
" : ".(empty($object->project->title) ?
'' : $object->projet->title),
'',
'R');
897 if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) {
898 $object->fetch_projet();
899 if (!empty($object->project->ref)) {
901 $pdf->SetXY($posx, $posy);
902 $pdf->SetTextColor(0, 0, 60);
903 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"Project").
" : ".(empty($object->project->title) ?
'' : $object->project->title),
'',
'R');
907 if (!empty($conf->global->PDF_SHOW_PROJECT)) {
908 $object->fetch_projet();
909 if (!empty($object->project->ref)) {
910 $outputlangs->load(
"projects");
912 $pdf->SetXY($posx, $posy);
913 $pdf->SetTextColor(0, 0, 60);
914 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"RefProject").
" : ".(empty($object->project->ref) ?
'' : $object->project->ref),
'',
'R');
919 $pdf->SetXY($posx, $posy);
920 $pdf->SetTextColor(0, 0, 60);
922 $title = $outputlangs->transnoentities(
"Date");
923 if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
924 $title .=
' - '.$outputlangsbis->transnoentities(
"Date");
926 $pdf->MultiCell($w, 3, $title.
" : ".
dol_print_date($object->date_creation,
"day",
false, $outputlangs),
'',
'R');
928 if ($object->thirdparty->code_client) {
930 $pdf->SetXY($posx, $posy);
931 $pdf->SetTextColor(0, 0, 60);
932 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"CustomerCode").
" : ".$outputlangs->transnoentities($object->thirdparty->code_client),
'',
'R');
939 $current_y = $pdf->getY();
940 $posy =
pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3,
'R', $default_font_size);
941 if ($current_y < $pdf->getY()) {
942 $top_shift = $pdf->getY() - $current_y;
947 $carac_emetteur =
pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty,
'', 0,
'source', $object);
950 $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
952 $posx = $this->marge_gauche;
953 if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
954 $posx = $this->page_largeur - $this->marge_droite - 80;
957 $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40;
958 $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82;
962 $pdf->SetTextColor(0, 0, 0);
963 $pdf->SetFont(
'',
'', $default_font_size - 2);
964 $pdf->SetXY($posx, $posy - 5);
965 $pdf->MultiCell(66, 5, $outputlangs->transnoentities(
"BillFrom").
":", 0,
'L');
966 $pdf->SetXY($posx, $posy);
967 $pdf->SetFillColor(230, 230, 230);
968 $pdf->MultiCell($widthrecbox, $hautcadre,
"", 0,
'R', 1);
969 $pdf->SetTextColor(0, 0, 60);
972 $pdf->SetXY($posx + 2, $posy + 3);
973 $pdf->SetFont(
'',
'B', $default_font_size);
974 $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0,
'L');
975 $posy = $pdf->getY();
978 $pdf->SetXY($posx + 2, $posy);
979 $pdf->SetFont(
'',
'', $default_font_size - 1);
980 $pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0,
'L');
984 $arrayidcontact = $object->getIdContact(
'external',
'BILLING');
985 if (count($arrayidcontact) > 0) {
987 $result = $object->fetch_contact($arrayidcontact[0]);
1032 $pdf->SetTextColor(0, 0, 0);