27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
46 $langs->loadLangs(array(
"bills",
"compta",
"main"));
49 $this->
description = $langs->transnoentities(
"ListOfCustomerPayments");
54 $this->page_largeur = $formatarray[
'width'];
55 $this->page_hauteur = $formatarray[
'height'];
56 $this->format = array($this->page_largeur, $this->page_hauteur);
57 $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
58 $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
59 $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
60 $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
64 $this->line_height = 5;
65 $this->line_per_page = 40;
66 $this->tab_height = $this->page_hauteur - $this->marge_haute - $this->marge_basse - $this->tab_top - 5;
68 $this->posxdate = $this->marge_gauche + 2;
69 $this->posxpaymenttype = 42;
70 $this->posxinvoice = 82;
71 $this->posxbankaccount = 110;
72 $this->posxinvoiceamount = 132;
73 $this->posxpaymentamount = 162;
74 if ($this->page_largeur < 210)
76 $this->line_per_page = 35;
77 $this->posxpaymenttype -= 10;
78 $this->posxinvoice -= 0;
79 $this->posxinvoiceamount -= 10;
80 $this->posxpaymentamount -= 20;
83 $this->doc_type =
"client";
97 public function write_file($_dir, $month, $year, $outputlangs)
100 include_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
102 global $conf, $hookmanager, $langs, $user;
105 if ($user->socid) $socid = $user->socid;
107 if (!is_object($outputlangs)) $outputlangs = $langs;
109 if (!empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output =
'ISO-8859-1';
111 $this->month = $month;
113 $dir = $_dir.
'/'.$year;
120 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
125 $month = sprintf(
"%02d", $month);
126 $year = sprintf(
"%04d", $year);
128 $file = $dir.
"/payments-".$year.
"-".$month.
".pdf";
129 switch ($this->doc_type) {
131 $file = $dir.
"/payments-".$year.
"-".$month.
".pdf";
134 $file = $dir.
"/supplier_payments-".$year.
"-".$month.
".pdf";
140 if (!is_object($hookmanager))
142 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
145 $hookmanager->initHooks(array(
'pdfgeneration'));
146 $parameters = array(
'file'=>$file,
'outputlangs'=>$outputlangs);
148 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters, $object, $action);
153 if (class_exists(
'TCPDF'))
155 $pdf->setPrintHeader(
false);
156 $pdf->setPrintFooter(
false);
164 $sql =
"SELECT p.rowid as prowid";
165 switch ($this->doc_type) {
167 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiement as p";
170 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiementfourn as p";
174 $sql .=
" AND p.entity = ".$conf->entity;
175 $result = $this->
db->query($sql);
178 $numpaiement = $this->
db->num_rows($result);
182 switch ($this->doc_type) {
184 $sql =
"SELECT p.datep as dp, f.ref";
185 $sql .=
", c.code as paiement_code, p.num_paiement as num_payment";
186 $sql .=
", p.amount as paiement_amount, f.total_ttc as facture_amount";
187 $sql .=
", pf.amount as pf_amount";
188 if (!empty($conf->banque->enabled))
189 $sql .=
", ba.ref as bankaccount";
190 $sql .=
", p.rowid as prowid";
191 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiement as p LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as c ON p.fk_paiement = c.id";
192 $sql .=
", ".MAIN_DB_PREFIX.
"facture as f,";
193 $sql .=
" ".MAIN_DB_PREFIX.
"paiement_facture as pf,";
194 if (!empty($conf->banque->enabled))
195 $sql .=
" ".MAIN_DB_PREFIX.
"bank as b, ".MAIN_DB_PREFIX.
"bank_account as ba,";
196 $sql .=
" ".MAIN_DB_PREFIX.
"societe as s";
197 if (!$user->rights->societe->client->voir && !$socid)
199 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
201 $sql .=
" WHERE f.fk_soc = s.rowid AND pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid";
202 if (!empty($conf->banque->enabled))
203 $sql .=
" AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid ";
204 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
206 if (!$user->rights->societe->client->voir && !$socid)
208 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
210 if (!empty($socid)) $sql .=
" AND s.rowid = ".$socid;
212 if (!empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD))
213 $sql .=
" ORDER BY paiement_code ASC, p.datep ASC, pf.fk_paiement ASC";
214 else $sql .=
" ORDER BY p.datep ASC, pf.fk_paiement ASC";
217 $sql =
"SELECT p.datep as dp, f.ref as ref";
218 $sql .=
", c.code as paiement_code, p.num_paiement as num_payment";
219 $sql .=
", p.amount as paiement_amount, f.total_ttc as facture_amount";
220 $sql .=
", pf.amount as pf_amount";
221 if (!empty($conf->banque->enabled))
222 $sql .=
", ba.ref as bankaccount";
223 $sql .=
", p.rowid as prowid";
224 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiementfourn as p LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as c ON p.fk_paiement = c.id";
225 $sql .=
", ".MAIN_DB_PREFIX.
"facture_fourn as f,";
226 $sql .=
" ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf,";
227 if (!empty($conf->banque->enabled))
228 $sql .=
" ".MAIN_DB_PREFIX.
"bank as b, ".MAIN_DB_PREFIX.
"bank_account as ba,";
229 $sql .=
" ".MAIN_DB_PREFIX.
"societe as s";
230 if (!$user->rights->societe->client->voir && !$socid)
232 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
234 $sql .=
" WHERE f.fk_soc = s.rowid AND pf.fk_facturefourn = f.rowid AND pf.fk_paiementfourn = p.rowid";
235 if (!empty($conf->banque->enabled))
236 $sql .=
" AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid ";
237 $sql .=
" AND f.entity = ".$conf->entity;
239 if (!$user->rights->societe->client->voir && !$socid)
241 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
243 if (!empty($socid)) $sql .=
" AND s.rowid = ".$socid;
245 if (!empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))
246 $sql .=
" ORDER BY paiement_code ASC, p.datep ASC, pf.fk_paiementfourn ASC";
247 else $sql .=
" ORDER BY p.datep ASC, pf.fk_paiementfourn ASC";
251 dol_syslog(get_class($this).
"::write_file", LOG_DEBUG);
252 $result = $this->
db->query($sql);
255 $num = $this->
db->num_rows($result);
260 $objp = $this->
db->fetch_object($result);
262 $lines[$i][0] = $objp->ref;
263 $lines[$i][1] =
dol_print_date($this->
db->jdate($objp->dp),
"day",
false, $outputlangs,
true);
264 $lines[$i][2] = $langs->transnoentities(
"PaymentTypeShort".$objp->paiement_code);
265 $lines[$i][3] = $objp->num_payment;
266 $lines[$i][4] =
price($objp->paiement_amount);
267 $lines[$i][5] =
price($objp->facture_amount);
268 $lines[$i][6] =
price($objp->pf_amount);
269 $lines[$i][7] = $objp->prowid;
270 $lines[$i][8] = $objp->bankaccount;
271 $lines[$i][9] = $objp->paiement_amount;
278 $pages = intval(($num + $numpaiement) / $this->line_per_page);
280 if ((($num + $numpaiement) % $this->line_per_page) > 0)
293 $pdf->SetDrawColor(128, 128, 128);
295 $pdf->SetTitle($outputlangs->transnoentities(
"Payments"));
296 $pdf->SetSubject($outputlangs->transnoentities(
"Payments"));
297 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
298 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
300 if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(
false);
302 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
303 $pdf->SetAutoPageBreak(1, 0);
308 $this->
_pagehead($pdf, $pagenb, 1, $outputlangs);
309 $pdf->SetFont(
'',
'', 9);
310 $pdf->MultiCell(0, 3,
'');
311 $pdf->SetTextColor(0, 0, 0);
314 $this->
Body($pdf, 1, $lines, $outputlangs);
316 if (method_exists($pdf,
'AliasNbPages')) $pdf->AliasNbPages();
320 $pdf->Output($file,
'F');
323 if (!is_object($hookmanager))
325 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
328 $hookmanager->initHooks(array(
'pdfgeneration'));
329 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
331 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
334 $this->error = $hookmanager->error;
335 $this->errors = $hookmanager->errors;
338 if (!empty($conf->global->MAIN_UMASK))
339 @chmod($file, octdec($conf->global->MAIN_UMASK));
341 $this->result = array(
'fullpath'=>$file);
356 protected function _pagehead(&$pdf, $page, $showaddress, $outputlangs)
359 global $langs, $conf;
366 $title = $conf->global->MAIN_INFO_SOCIETE_NOM;
367 switch ($this->doc_type) {
369 $title .=
' - '.$outputlangs->transnoentities(
"ListOfCustomerPayments");
372 $title .=
' - '.$outputlangs->transnoentities(
"ListOfSupplierPayments");
375 $title .=
' - '.dol_print_date(
dol_mktime(0, 0, 0, $this->month, 1, $this->year),
"%B %Y",
false, $outputlangs,
true);
376 $pdf->SetFont(
'',
'B', $default_font_size + 1);
377 $pdf->SetXY($this->marge_gauche, 10);
378 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->marge_gauche, 2, $title, 0,
'C');
380 $pdf->SetFont(
'',
'', $default_font_size);
382 $pdf->SetXY($this->posxdate, 16);
383 $pdf->MultiCell(80, 2, $outputlangs->transnoentities(
"DateBuild").
" : ".
dol_print_date(time(),
"day",
false, $outputlangs,
true), 0,
'L');
385 $pdf->SetXY($this->posxdate + 100, 16);
386 $pdf->MultiCell(80, 2, $outputlangs->transnoentities(
"Page").
" : ".$page, 0,
'R');
390 $pdf->SetXY($this->posxdate, $this->tab_top + 2);
391 $pdf->MultiCell($this->posxpaymenttype - $this->posxdate, 2,
'Date');
393 $pdf->line($this->posxpaymenttype - 1, $this->tab_top, $this->posxpaymenttype - 1, $this->tab_top + $this->tab_height + 10);
394 $pdf->SetXY($this->posxpaymenttype, $this->tab_top + 2);
395 $pdf->MultiCell($this->posxinvoice - $this->posxpaymenttype, 2, $outputlangs->transnoentities(
"PaymentMode"), 0,
'L');
397 $pdf->line($this->posxinvoice - 1, $this->tab_top, $this->posxinvoice - 1, $this->tab_top + $this->tab_height + 10);
398 $pdf->SetXY($this->posxinvoice, $this->tab_top + 2);
399 $pdf->MultiCell($this->posxbankaccount - $this->posxinvoice, 2, $outputlangs->transnoentities(
"Invoice"), 0,
'L');
401 $pdf->line($this->posxbankaccount - 1, $this->tab_top, $this->posxbankaccount - 1, $this->tab_top + $this->tab_height + 10);
402 $pdf->SetXY($this->posxbankaccount, $this->tab_top + 2);
403 $pdf->MultiCell($this->posxinvoiceamount - $this->posxbankaccount, 2, $outputlangs->transnoentities(
"Account"), 0,
'L');
406 $pdf->line($this->posxinvoiceamount - 1, $this->tab_top, $this->posxinvoiceamount - 1, $this->tab_top + $this->tab_height + 10);
407 $pdf->SetXY($this->posxinvoiceamount, $this->tab_top + 2);
408 $pdf->MultiCell($this->posxpaymentamount - $this->posxinvoiceamount - 1, 2, $outputlangs->transnoentities(
"AmountInvoice"), 0,
'R');
410 $pdf->line($this->posxpaymentamount - 1, $this->tab_top, $this->posxpaymentamount - 1, $this->tab_top + $this->tab_height + 10);
411 $pdf->SetXY($this->posxpaymentamount, $this->tab_top + 2);
412 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount - 1, 2, $outputlangs->transnoentities(
"AmountPayment"), 0,
'R');
414 $pdf->line($this->marge_gauche, $this->tab_top + 10, $this->page_largeur - $this->marge_droite, $this->tab_top + 10);
416 $pdf->Rect($this->marge_gauche, $this->tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $this->tab_height + 10);
430 public function Body(&$pdf, $page, $lines, $outputlangs)
433 global $langs, $conf;
436 $pdf->SetFont(
'',
'', $default_font_size - 1);
440 $pdf->SetFillColor(220, 220, 220);
442 $numlines = count($lines);
443 if (($this->doc_type ==
'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type ==
'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD)))
448 for ($j = 0; $j < $numlines; $j++)
451 if ($yp > $this->tab_height - 5)
455 $this->
_pagehead($pdf, $page, 0, $outputlangs);
456 $pdf->SetFont(
'',
'', $default_font_size - 1);
459 if ($oldprowid <> $lines[$j][7])
461 if ($yp > $this->tab_height - 15)
463 $pdf->SetFillColor(255, 255, 255);
464 $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height,
'F', array(), array());
465 $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array(
'dash'=>1));
466 $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
467 $pdf->SetFont(
'',
'B', $default_font_size - 1);
468 $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
469 $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities(
'SubTotal').
" : ", 0,
'R', 1);
470 $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp);
471 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height,
price($total_page), 0,
'R', 1);
472 $pdf->SetFont(
'',
'', $default_font_size - 1);
473 $pdf->SetFillColor(220, 220, 220);
476 $this->
_pagehead($pdf, $page, 0, $outputlangs);
477 $pdf->SetFont(
'',
'', $default_font_size - 1);
479 $total += $total_page;
483 $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
484 $pdf->MultiCell($this->posxpaymenttype - $this->posxdate + 1, $this->line_height, $lines[$j][1], 0,
'L', 1);
486 $pdf->SetXY($this->posxpaymenttype, $this->tab_top + 10 + $yp);
487 $pdf->MultiCell($this->posxinvoiceamount - $this->posxpaymenttype, $this->line_height, $lines[$j][2].
' '.$lines[$j][3], 0,
'L', 1);
489 $pdf->SetXY($this->posxinvoiceamount, $this->tab_top + 10 + $yp);
490 $pdf->MultiCell($this->posxpaymentamount - $this->posxinvoiceamount, $this->line_height,
'', 0,
'R', 1);
492 $pdf->SetXY($this->posxpaymentamount, $this->tab_top + 10 + $yp);
493 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $lines[$j][4], 0,
'R', 1);
495 $total_page += $lines[$j][9];
496 if (($this->doc_type ==
'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type ==
'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) $total_mod += $lines[$j][9];
500 $pdf->SetXY($this->posxinvoice, $this->tab_top + 10 + $yp);
501 $pdf->MultiCell($this->posxinvoice - $this->posxbankaccount, $this->line_height, $lines[$j][0], 0,
'L', 0);
504 $pdf->SetXY($this->posxbankaccount, $this->tab_top + 10 + $yp);
505 $pdf->MultiCell($this->posxbankaccount - $this->posxdate, $this->line_height, $lines[$j][8], 0,
'L', 0);
508 $pdf->SetXY($this->posxinvoiceamount, $this->tab_top + 10 + $yp);
509 $pdf->MultiCell($this->posxpaymentamount - $this->posxinvoiceamount - 1, $this->line_height, $lines[$j][5], 0,
'R', 0);
512 $pdf->SetXY($this->posxpaymentamount, $this->tab_top + 10 + $yp);
513 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $lines[$j][6], 0,
'R', 0);
516 if ($oldprowid <> $lines[$j][7])
518 $oldprowid = $lines[$j][7];
522 if ((($this->doc_type ==
'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type ==
'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j + 1][2]))
524 $pdf->SetFillColor(245, 245, 245);
525 $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height,
'F', array(), array());
526 $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array(
'dash'=>1));
527 $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
528 $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
529 $pdf->SetFont(
'',
'I', $default_font_size - 1);
530 $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities(
'Total').
' '.$mod.
" : ", 0,
'R', 1);
531 $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp);
532 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height,
price($total_mod), 0,
'R', 1);
533 $pdf->SetFont(
'',
'', $default_font_size - 1);
534 $mod = $lines[$j + 1][2];
537 if ($yp > $this->tab_height - 5)
541 $this->
_pagehead($pdf, $page, 0, $outputlangs);
542 $pdf->SetFont(
'',
'', $default_font_size - 1);
545 $pdf->SetFillColor(220, 220, 220);
548 $total += $total_page;
549 $pdf->SetFillColor(255, 255, 255);
550 $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height,
'F', array(), array());
551 $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array(
'dash'=>1));
552 $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
553 $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
554 $pdf->SetFont(
'',
'B');
555 $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities(
'Total').
" : ", 0,
'R', 1);
556 $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp);
557 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height,
price($total), 0,
'R', 1);
558 $pdf->SetFillColor(220, 220, 220);
pdf_getFormat(Translate $outputlangs=null, $mode= 'setup')
Return array with format properties of default PDF format.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm= 'auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
_pagehead(&$pdf, $page, $showaddress, $outputlangs)
Show top header of page.
</td > param sortfield sortorder printFieldListOption< tdclass="liste_titremaxwidthsearchright"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration center DesiredStock p desiredstock right StockLimitShort p seuil_stock_alerte right stock_physique right stock_real_warehouse right Ordered right StockToBuy right SupplierRef right param sortfield sortorder printFieldListTitle warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow StockTooLow help help help< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"> stock</td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
pdf_getPDFFontSize($outputlangs)
Return font size to use for PDF generation.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
pdf_getPDFFont($outputlangs)
Return font name to use for PDF generation.
$conf db
API class for accounts.
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...
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
write_file($_dir, $month, $year, $outputlangs)
Fonction generant la rapport sur le disque.
Classe permettant de generer les rapports de paiement.
pdf_getInstance($format= '', $metric= 'mm', $pagetype= 'P')
Return a PDF instance object.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Body(&$pdf, $page, $lines, $outputlangs)
Output body.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
__construct($db)
Constructor.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
dol_mkdir($dir, $dataroot= '', $newmask=null)
Creation of a directory (this can create recursive subdir)