28 require_once DOL_DOCUMENT_ROOT.
'/core/modules/supplier_payment/modules_supplier_payment.php';
29 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functionsnumtoword.lib.php';
60 public $update_main_doc_field;
71 public $phpmin = array(7, 0);
77 public $version =
'dolibarr';
86 public $posxreffacturefourn;
87 public $posxreffacture;
101 global $conf, $langs, $mysoc;
104 $langs->loadLangs(array(
"main",
"bills"));
107 $this->
name =
"standard";
108 $this->
description = $langs->trans(
'DocumentModelStandardPDF');
109 $this->update_main_doc_field = 0;
114 $this->page_largeur = $formatarray[
'width'];
115 $this->page_hauteur = $formatarray[
'height'];
116 $this->format = array($this->page_largeur, $this->page_hauteur);
122 $this->option_logo = 1;
123 $this->option_multilang = 1;
126 $this->posxdate = $this->marge_gauche + 1;
127 $this->posxreffacturefourn = 30;
128 $this->posxreffacture = 65;
129 $this->posxtype = 100;
130 $this->posxtotalht = 80;
132 $this->posxtotalttc = 180;
135 if ($this->page_largeur < 210) {
136 $this->posxreffacturefourn -= 20;
137 $this->posxreffacture -= 20;
138 $this->posxtype -= 20;
139 $this->posxtotalht -= 20;
140 $this->posxtva -= 20;
141 $this->posxtotalttc -= 20;
144 $this->tva = array();
145 $this->tva_array = array();
146 $this->localtax1 = array();
147 $this->localtax2 = array();
148 $this->atleastoneratenotnull = 0;
149 $this->atleastonediscount = 0;
152 $this->emetteur = $mysoc;
153 if (!$this->emetteur->country_code) {
154 $this->emetteur->country_code = substr($langs->defaultlang, -2);
171 public function write_file($object, $outputlangs =
'', $srctemplatepath =
'', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
174 global $user, $langs, $conf, $mysoc, $hookmanager;
176 if (!is_object($outputlangs)) {
177 $outputlangs = $langs;
180 if (!empty($conf->global->MAIN_USE_FPDF)) {
181 $outputlangs->charset_output =
'ISO-8859-1';
185 $outputlangs->loadLangs(array(
"main",
"suppliers",
"companies",
"bills",
"dict",
"products"));
187 $object->factures = array();
189 if ($conf->fournisseur->payment->dir_output) {
190 $object->fetch_thirdparty();
194 $sql =
'SELECT f.rowid, f.ref, f.datef, f.ref_supplier, f.total_ht, f.total_tva, f.total_ttc, pf.amount, f.rowid as facid, f.paye';
195 $sql .=
', f.fk_statut, s.nom as name, s.rowid as socid';
196 $sql .=
' FROM '.MAIN_DB_PREFIX.
'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.
'facture_fourn as f,'.MAIN_DB_PREFIX.
'societe as s';
197 $sql .=
' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid';
198 $sql .=
' AND pf.fk_paiementfourn = '.((int) $object->id);
201 if ($this->
db->num_rows(
$resql) > 0) {
202 while ($objp = $this->
db->fetch_object(
$resql)) {
203 $objp->type = $outputlangs->trans(
'SupplierInvoice');
204 $object->lines[] = $objp;
209 $total = $object->amount;
212 if ($object->specimen) {
213 $dir = $conf->fournisseur->payment->dir_output;
214 $file = $dir.
"/SPECIMEN.pdf";
218 $dir = $conf->fournisseur->payment->dir_output.
'/'.$objectref;
219 $file = $dir.
"/".$objectref.
".pdf";
220 if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) {
221 $file = $dir.
"/".$objectref.($objectrefsupplier ?
"_".$objectrefsupplier :
"").
".pdf";
225 if (!file_exists($dir)) {
227 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
232 if (file_exists($dir)) {
234 if (!is_object($hookmanager)) {
235 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
238 $hookmanager->initHooks(array(
'pdfgeneration'));
239 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
241 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters, $object, $action);
243 $nblines = count($object->lines);
247 $heightforinfotot = 50;
248 $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5);
249 $heightforfooter = $this->marge_basse + 8;
250 if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) {
251 $heightforfooter += 6;
253 $pdf->SetAutoPageBreak(1, 0);
255 if (class_exists(
'TCPDF')) {
256 $pdf->setPrintHeader(
false);
257 $pdf->setPrintFooter(
false);
261 if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
262 $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.
'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
263 $tplidx = $pdf->importPage(1);
268 $pdf->SetDrawColor(128, 128, 128);
270 $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
271 $pdf->SetSubject($outputlangs->transnoentities(
"Invoice"));
272 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
273 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
274 $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref).
" ".$outputlangs->transnoentities(
"Order").
" ".$outputlangs->convToOutputCharset($object->thirdparty->name));
276 $pdf->SetCompression(
false);
279 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
284 if (!empty($tplidx)) {
285 $pdf->useTemplate($tplidx);
288 $this->
_pagehead($pdf, $object, 1, $outputlangs);
289 $pdf->SetFont(
'',
'', $default_font_size - 1);
290 $pdf->MultiCell(0, 3,
'');
291 $pdf->SetTextColor(0, 0, 0);
294 $tab_top_newpage = (!
getDolGlobalInt(
'MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
296 $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
299 $height_incoterms = 0;
303 $iniY = $tab_top + 7;
304 $curY = $tab_top + 7;
305 $nexY = $tab_top + 7;
308 for ($i = 0; $i < $nblines; $i++) {
310 $pdf->SetFont(
'',
'', $default_font_size - 1);
311 $pdf->SetTextColor(0, 0, 0);
313 $pdf->setTopMargin($tab_top_newpage);
314 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext + $heightforinfotot);
315 $pageposbefore = $pdf->getPage();
318 $curX = $this->posxdate - 1;
319 $showpricebeforepagebreak = 1;
321 $pdf->startTransaction();
323 $pdf->writeHTMLCell($this->posxtva - $curX, 4, $curX, $curY, $object->lines[$i]->datef, 0, 1,
false,
true,
'J',
true);
324 $pageposafter = $pdf->getPage();
325 if ($pageposafter > $pageposbefore) {
326 $pdf->rollbackTransaction(
true);
327 $pageposafter = $pageposbefore;
329 $pdf->setPageOrientation(
'', 1, $heightforfooter);
331 $pdf->writeHTMLCell($this->posxtva - $curX, 4, $curX, $curY, $object->lines[$i]->datef, 0, 1,
false,
true,
'J',
true);
332 $posyafter = $pdf->GetY();
333 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {
334 if ($i == ($nblines - 1)) {
335 $pdf->AddPage(
'',
'',
true);
336 if (!empty($tplidx)) {
337 $pdf->useTemplate($tplidx);
340 $this->
_pagehead($pdf, $object, 0, $outputlangs);
342 $pdf->setPage($pageposafter + 1);
347 if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) {
348 $showpricebeforepagebreak = 1;
350 $showpricebeforepagebreak = 0;
355 $pdf->commitTransaction();
358 $nexY = $pdf->GetY();
359 $pageposafter = $pdf->getPage();
360 $pdf->setPage($pageposbefore);
361 $pdf->setTopMargin($this->marge_haute);
362 $pdf->setPageOrientation(
'', 1, 0);
365 if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
366 $pdf->setPage($pageposafter);
367 $curY = $tab_top_newpage;
370 $pdf->SetFont(
'',
'', $default_font_size - 1);
373 $pdf->SetXY($this->posxreffacturefourn, $curY);
374 $pdf->MultiCell($this->posxreffacturefourn - $this->posxup - 0.8, 3, $object->lines[$i]->ref_supplier, 0,
'L', 0);
377 $pdf->SetXY($this->posxreffacture, $curY);
378 $pdf->MultiCell($this->posxreffacture - $this->posxup - 0.8, 3, $object->lines[$i]->ref, 0,
'L', 0);
381 $pdf->SetXY($this->posxtype, $curY);
382 $pdf->MultiCell($this->posxtype - $this->posxup - 0.8, 3, $object->lines[$i]->type, 0,
'L', 0);
385 $pdf->SetXY($this->posxtotalht, $curY);
386 $pdf->MultiCell($this->posxtotalht - $this->posxup - 0.8, 3,
price($object->lines[$i]->total_ht), 0,
'R', 0);
389 $pdf->SetXY($this->posxtva, $curY);
390 $pdf->MultiCell($this->posxtva - $this->posxup - 0.8, 3,
price($object->lines[$i]->total_tva), 0,
'R', 0);
393 $pdf->SetXY($this->posxtotalttc, $curY);
394 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalttc, 3,
price($object->lines[$i]->total_ttc), 0,
'R', 0);
398 if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) {
399 $pdf->setPage($pageposafter);
400 $pdf->SetLineStyle(array(
'dash'=>
'1,1',
'color'=>array(80, 80, 80)));
402 $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
403 $pdf->SetLineStyle(array(
'dash'=>0));
409 while ($pagenb < $pageposafter) {
410 $pdf->setPage($pagenb);
412 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
414 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
416 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
418 $pdf->setPage($pagenb);
419 $pdf->setPageOrientation(
'', 1, 0);
421 $this->
_pagehead($pdf, $object, 0, $outputlangs);
423 if (!empty($tplidx)) {
424 $pdf->useTemplate($tplidx);
427 if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
429 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
431 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
433 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
436 if (!empty($tplidx)) {
437 $pdf->useTemplate($tplidx);
441 $this->
_pagehead($pdf, $object, 0, $outputlangs);
448 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
449 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
451 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
452 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
456 $posy = $this->
_tableau_cheque($pdf, $object, $bottomlasttab, $outputlangs);
462 $this->
_pagefoot($pdf, $object, $outputlangs);
463 if (method_exists($pdf,
'AliasNbPages')) {
464 $pdf->AliasNbPages();
469 $pdf->Output($file,
'F');
472 $hookmanager->initHooks(array(
'pdfgeneration'));
473 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
475 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
477 $this->error = $hookmanager->error;
478 $this->errors = $hookmanager->errors;
481 if (!empty($conf->global->MAIN_UMASK)) {
482 @chmod($file, octdec($conf->global->MAIN_UMASK));
485 $this->result = array(
'fullpath'=>$file);
489 $this->error = $langs->trans(
"ErrorCanNotCreateDir", $dir);
493 $this->error = $langs->trans(
"ErrorConstantNotDefined",
"SUPPLIER_OUTPUTDIR");
512 global $conf, $mysoc;
516 $pdf->SetFont(
'',
'', $default_font_size - 1);
517 $pdf->SetFillColor(255, 255, 255);
520 $pdf->SetXY($this->marge_gauche, $posy);
521 $pdf->MultiCell(30, 4,
'N° '.$outputlangs->transnoentities(
"Payment"), 0,
'L', 1);
524 $pdf->SetXY($this->marge_gauche + 30, $posy);
525 $pdf->MultiCell(50, 4, $object->ref, 0,
'L', 1);
528 $pdf->SetXY($this->page_largeur - $this->marge_droite - 50, $posy);
529 $pdf->MultiCell(50, 4,
price($object->amount), 0,
'R', 1);
533 $currency = $conf->currency;
534 $translateinletter = strtoupper(
dol_convertToWord($object->amount, $outputlangs, $currency));
535 $pdf->SetXY($this->marge_gauche + 50, $posy);
536 $pdf->MultiCell(90, 8, $translateinletter, 0,
'L', 1);
540 $pdf->SetXY($this->marge_gauche + 50, $posy);
541 $pdf->MultiCell(150, 4, $object->thirdparty->nom, 0,
'L', 1);
543 $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy);
544 $pdf->MultiCell(35, 4, str_pad(
price($object->amount).
' '.$currency, 18,
'*', STR_PAD_LEFT), 0,
'R', 1);
548 $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy);
549 $pdf->MultiCell(150, 4, $mysoc->town, 0,
'L', 1);
553 $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy);
554 $pdf->MultiCell(150, 4, date(
"d").
' '.$outputlangs->transnoentitiesnoconv(date(
"F")).
' '.date(
"Y"), 0,
'L', 1);
571 protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency =
'')
573 global $conf, $mysoc;
581 $currency = !empty($currency) ? $currency : $conf->currency;
585 $pdf->SetTextColor(0, 0, 0);
586 $pdf->SetFont(
'',
'', $default_font_size - 2);
592 $titre = $outputlangs->transnoentities(
"AmountInCurrency", $outputlangs->transnoentitiesnoconv(
"Currency".$currency));
593 $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top);
594 $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
597 $pdf->SetDrawColor(128, 128, 128);
598 $pdf->SetFont(
'',
'', $default_font_size - 1);
614 protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
616 global $langs, $conf, $mysoc;
619 $outputlangs->loadLangs(array(
"main",
"orders",
"companies",
"bills"));
626 $pdf->SetTextColor(0, 0, 60);
627 $pdf->SetFont(
'',
'B', $default_font_size + 3);
629 $posy = $this->marge_haute;
630 $posx = $this->page_largeur - $this->marge_droite - 100;
632 $pdf->SetXY($this->marge_gauche, $posy);
635 $logo = $conf->mycompany->dir_output.
'/logos/'.$mysoc->logo;
637 if (is_readable($logo)) {
639 $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
641 $pdf->SetTextColor(200, 0, 0);
642 $pdf->SetFont(
'',
'B', $default_font_size - 2);
643 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ErrorLogoFileNotFound", $logo), 0,
'L');
644 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ErrorGoToModuleSetup"), 0,
'L');
647 $text = $this->emetteur->name;
648 $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0,
'L');
724 $carac_emetteur =
pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
728 $posx = $this->marge_gauche;
729 if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
730 $posx = $this->page_largeur - $this->marge_droite - 80;
735 $pdf->SetTextColor(0, 0, 0);
736 $pdf->SetFont(
'',
'', $default_font_size - 2);
737 $pdf->SetXY($posx, $posy - 5);
738 $pdf->MultiCell(80, 5, $outputlangs->transnoentities(
"PayedBy"), 0,
'L');
739 $pdf->SetXY($posx, $posy);
740 $pdf->SetFillColor(230, 230, 230);
741 $pdf->MultiCell(82, $hautcadre,
"", 0,
'R', 1);
742 $pdf->SetTextColor(0, 0, 60);
745 $pdf->SetXY($posx + 2, $posy + 3);
746 $pdf->SetFont(
'',
'B', $default_font_size);
747 $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0,
'L');
748 $posy = $pdf->getY();
751 $pdf->SetXY($posx + 2, $posy);
752 $pdf->SetFont(
'',
'', $default_font_size - 1);
753 $pdf->MultiCell(80, 4, $carac_emetteur, 0,
'L');
756 $thirdparty = $object->thirdparty;
762 $carac_client =
pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ((!empty($object->contact)) ? $object->contact :
null), $usecontact,
'target', $object);
766 if ($this->page_largeur < 210) {
770 $posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
771 if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
772 $posx = $this->marge_gauche;
776 $pdf->SetTextColor(0, 0, 0);
777 $pdf->SetFont(
'',
'', $default_font_size - 2);
778 $pdf->SetXY($posx + 2, $posy - 5);
779 $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities(
"PayedTo"), 0,
'L');
780 $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
783 $pdf->SetXY($posx + 2, $posy + 3);
784 $pdf->SetFont(
'',
'B', $default_font_size);
785 $pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0,
'L');
787 $posy = $pdf->getY();
790 $pdf->SetFont(
'',
'', $default_font_size - 1);
791 $pdf->SetXY($posx + 2, $posy);
792 $pdf->MultiCell($widthrecbox, 4, $carac_client, 0,
'L');
795 $sql =
"SELECT iban_prefix as iban";
796 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe_rib as rib";
797 $sql .=
" WHERE fk_soc = ".($object->thirdparty->id);
798 $sql .=
" AND rib.default_rib = 1";
799 $sql .=
" AND rib.type = 'ban'";
803 $obj = $this->
db->fetch_object(
$resql);
808 $pdf->SetFont(
'',
'', $default_font_size - 1);
809 $pdf->SetXY($posx + 2, $posy + 15);
810 $pdf->MultiCell($widthrecbox, 4, $langs->trans(
"IBAN").
': '.$iban, 0,
'L');
825 protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
827 $showdetails =
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
828 return pdf_pagefoot($pdf, $outputlangs,
'SUPPLIER_INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
Parent class for supplier invoices models.
Class to generate expense report based on standard model.
__construct($db)
Constructor.
write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build pdf onto disk.
_tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='')
Show table for lines.
_tableau_cheque(&$pdf, $object, $posy, $outputlangs)
Show total to pay.
_pagehead(&$pdf, $object, $showaddress, $outputlangs)
Show top header of page.
_pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
Show footer of page.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
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.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
dol_convertToWord($num, $langs, $currency='', $centimes=false)
Function to return a number into a text.
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_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 formated for output on 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.
$conf db
API class for accounts.