dolibarr 25.0.0-alpha
pdf_standard_inventory.modules.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2026 Jose MARTINEZ <jose.martinez@pichinov.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
24require_once DOL_DOCUMENT_ROOT.'/core/modules/inventory/modules_inventory.php';
25require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
26require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
27require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
29
30
38{
42 public $db;
43
47 public $name;
48
52 public $description;
53
57 public $update_main_doc_field;
58
62 public $type;
63
68 public $version = 'dolibarr';
69
73 public $emetteur;
74
78 public $posxproduct;
82 public $posxlabel;
86 public $posxwarehouse;
90 public $posxbatch;
94 public $posxqtystock;
98 public $posxqtyview;
102 public $posxgap;
106 public $posxend;
107
108
114 public function __construct($db)
115 {
116 global $langs, $mysoc;
117
118 // Translations
119 $langs->loadLangs(array("main", "stocks", "products"));
120
121 $this->db = $db;
122 $this->name = "standard_inventory";
123 $this->description = $langs->trans("InventorySheetPdfModelDesc");
124 $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
125
126 // Dimension page
127 $this->type = 'pdf';
128 $formatarray = pdf_getFormat();
129 $this->page_largeur = $formatarray['width'];
130 $this->page_hauteur = $formatarray['height'];
131 $this->format = array($this->page_largeur, $this->page_hauteur);
132 $this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
133 $this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
134 $this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
135 $this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
136
137 $this->option_logo = 1; // Display logo
138 $this->option_multilang = 1; // Available in several languages
139 $this->option_freetext = 1; // Support add of a personalised text
140
141 // Get source company
142 $this->emetteur = $mysoc;
143 if (empty($this->emetteur->country_code)) {
144 $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
145 }
146 }
147
148
149 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
161 public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
162 {
163 // phpcs:enable
164 global $user, $langs, $conf, $mysoc, $hookmanager;
165
166 if (!is_object($outputlangs)) {
167 $outputlangs = $langs;
168 }
169 // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
170 if (getDolGlobalString('MAIN_USE_FPDF')) {
171 $outputlangs->charset_output = 'ISO-8859-1';
172 }
173
174 // Load translation files required by the page
175 $outputlangs->loadLangs(array("main", "dict", "companies", "stocks", "products"));
176
177 $isspecimen = empty($object->id);
178
179 if (empty($conf->stock->multidir_output[$isspecimen ? $conf->entity : ($object->entity ? $object->entity : $conf->entity)])) {
180 $this->error = 'Error: no output dir defined for module stock';
181 return 0;
182 }
183 $basedir = $conf->stock->multidir_output[$isspecimen ? $conf->entity : ($object->entity ? $object->entity : $conf->entity)].'/inventory';
184
185 if ($isspecimen) {
186 $dir = $basedir;
187 $file = $dir.'/SPECIMEN.pdf';
188 } else {
189 $objectref = dol_sanitizeFileName((string) $object->ref);
190 $dir = $basedir.'/'.$objectref;
191 $file = $dir.'/'.$objectref.'.pdf';
192 }
193
194 if (!file_exists($dir)) {
195 if (dol_mkdir($dir) < 0) {
196 $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
197 return 0;
198 }
199 }
200
201 // Load the lines of the inventory
202 $lines = array();
203 if ($isspecimen) {
204 for ($i = 1; $i <= 5; $i++) {
205 $line = new stdClass();
206 $line->product_ref = 'PROD'.sprintf('%04d', $i);
207 $line->product_label = 'Product '.$i;
208 $line->warehouse_ref = 'WH-A';
209 $line->batch = '';
210 $line->qty_stock = 10 * $i;
211 $line->qty_view = 10 * $i - ($i % 2);
212 $line->pmp = 2.5 * $i;
213 $lines[] = $line;
214 }
215 $recorded = false;
216 } else {
217 $recorded = ((int) $object->status >= Inventory::STATUS_RECORDED);
218 $sql = "SELECT id.rowid, id.qty_stock, id.qty_view, id.qty_regulated, id.batch, id.pmp_real, id.pmp_expected,";
219 $sql .= " p.ref as product_ref, p.label as product_label, e.ref as warehouse_ref";
220 $sql .= " FROM ".MAIN_DB_PREFIX."inventorydet as id";
221 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = id.fk_product";
222 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e ON e.rowid = id.fk_warehouse";
223 $sql .= " WHERE id.fk_inventory = ".((int) $object->id);
224 $sql .= " ORDER BY e.ref, p.ref";
225 $resql = $this->db->query($sql);
226 if (!$resql) {
227 $this->error = $this->db->lasterror();
228 return 0;
229 }
230 while ($obj = $this->db->fetch_object($resql)) {
231 $line = new stdClass();
232 $line->product_ref = (string) $obj->product_ref;
233 $line->product_label = (string) $obj->product_label;
234 $line->warehouse_ref = (string) $obj->warehouse_ref;
235 $line->batch = (string) $obj->batch;
236 $line->qty_stock = $obj->qty_stock;
237 $line->qty_view = $recorded ? ($obj->qty_view !== null ? $obj->qty_view : ($obj->qty_stock + $obj->qty_regulated)) : $obj->qty_view;
238 $line->pmp = ($obj->pmp_real !== null && (float) $obj->pmp_real != 0) ? $obj->pmp_real : $obj->pmp_expected;
239 $lines[] = $line;
240 }
241 }
242
243 // Create pdf instance
244 $pdf = pdf_getInstance($this->format);
245 $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
246 $pdf->SetAutoPageBreak(true, 0);
247
248 $heightforinfotot = 30; // Height reserved to output the totals table
249 $heightforsignature = ($isspecimen || !$recorded) ? 25 : 0; // Height reserved for the signature block on count sheets
250 $heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5);
251 $heightforfooter = $this->marge_basse + 8;
252
253 if (class_exists('TCPDF')) {
254 $pdf->setPrintHeader(false);
255 $pdf->setPrintFooter(false);
256 }
257 $pdf->SetFont(pdf_getPDFFont($outputlangs));
258
259 $pdf->Open();
260 $pagenb = 0;
261 $pdf->SetDrawColor(128, 128, 128);
262
263 $pdf->SetTitle($outputlangs->convToOutputCharset($isspecimen ? 'SPECIMEN' : $object->ref));
264 $pdf->SetSubject($outputlangs->transnoentities("Inventory"));
265 $pdf->SetCreator("Dolibarr ".DOL_VERSION);
266 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
267 $pdf->SetKeyWords($outputlangs->convToOutputCharset($isspecimen ? 'SPECIMEN' : $object->ref)." ".$outputlangs->transnoentities("Inventory"));
268 if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) {
269 $pdf->SetCompression(false);
270 }
271
272 // @phan-suppress-next-line PhanPluginSuspiciousParamOrder
273 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
274
275 // Columns (from left)
276 $this->posxproduct = $this->marge_gauche;
277 $this->posxlabel = $this->marge_gauche + 30;
278 $this->posxwarehouse = $this->page_largeur - $this->marge_droite - 92;
279 $this->posxbatch = $this->page_largeur - $this->marge_droite - 70;
280 $this->posxqtystock = $this->page_largeur - $this->marge_droite - 50;
281 $this->posxqtyview = $this->page_largeur - $this->marge_droite - 34;
282 $this->posxgap = $this->page_largeur - $this->marge_droite - 18;
283 $this->posxend = $this->page_largeur - $this->marge_droite;
284
285 // New page
286 $pdf->AddPage();
287 $pagenb++;
288 $top_shift = $this->pageHead($pdf, $object, 1, $outputlangs, $recorded, $isspecimen);
289 $pdf->SetFont('', '', $default_font_size - 1);
290 $pdf->MultiCell(0, 3, ''); // Set interline to 3
291 $pdf->SetTextColor(0, 0, 0);
292
293 $tab_top = 42 + $top_shift;
294 $tab_top_newpage = 10;
295
296 // Table header
297 $this->tableHeader($pdf, $tab_top, $outputlangs, $recorded);
298 $nexY = $tab_top + 7;
299
300 $nblines = count($lines);
301 $totalgap = 0;
302 $totalgapvalue = 0;
303 $nbgap = 0;
304
305 for ($i = 0; $i < $nblines; $i++) {
306 $line = $lines[$i];
307 $curY = $nexY;
308 $pdf->SetFont('', '', $default_font_size - 2);
309
310 // Page break management
311 if ($curY > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot + $heightforsignature))) {
312 $this->pageFoot($pdf, $object, $outputlangs, 1);
313 $pdf->AddPage();
314 $pagenb++;
315 $this->tableHeader($pdf, $tab_top_newpage, $outputlangs, $recorded);
316 $curY = $tab_top_newpage + 7;
317 $pdf->SetFont('', '', $default_font_size - 2);
318 $pdf->SetTextColor(0, 0, 0);
319 }
320
321 // Product ref
322 $pdf->SetXY($this->posxproduct, $curY);
323 $pdf->MultiCell($this->posxlabel - $this->posxproduct - 1, 3, $outputlangs->convToOutputCharset($line->product_ref), 0, 'L');
324 // Label
325 $pdf->SetXY($this->posxlabel, $curY);
326 $pdf->MultiCell($this->posxwarehouse - $this->posxlabel - 1, 3, $outputlangs->convToOutputCharset(dol_trunc($line->product_label, 45)), 0, 'L');
327 // Warehouse
328 $pdf->SetXY($this->posxwarehouse, $curY);
329 $pdf->MultiCell($this->posxbatch - $this->posxwarehouse - 1, 3, $outputlangs->convToOutputCharset(dol_trunc($line->warehouse_ref, 12)), 0, 'L');
330 // Batch
331 $pdf->SetXY($this->posxbatch, $curY);
332 $pdf->MultiCell($this->posxqtystock - $this->posxbatch - 1, 3, $outputlangs->convToOutputCharset(dol_trunc($line->batch, 10)), 0, 'L');
333 // Expected qty
334 $pdf->SetXY($this->posxqtystock, $curY);
335 $pdf->MultiCell($this->posxqtyview - $this->posxqtystock - 1, 3, ($line->qty_stock !== null && $line->qty_stock !== '') ? price2num($line->qty_stock, 'MS') : '', 0, 'R');
336
337 if ($recorded) {
338 $gap = (float) $line->qty_view - (float) $line->qty_stock;
339 // Counted qty
340 $pdf->SetXY($this->posxqtyview, $curY);
341 $pdf->MultiCell($this->posxgap - $this->posxqtyview - 1, 3, price2num($line->qty_view, 'MS'), 0, 'R');
342 // Gap
343 if ($gap != 0) {
344 $pdf->SetTextColor(150, 0, 0);
345 $nbgap++;
346 }
347 $pdf->SetXY($this->posxgap, $curY);
348 $pdf->MultiCell($this->posxend - $this->posxgap, 3, ($gap > 0 ? '+' : '').price2num($gap, 'MS'), 0, 'R');
349 $pdf->SetTextColor(0, 0, 0);
350 $totalgap += $gap;
351 $totalgapvalue += $gap * (float) $line->pmp;
352 } else {
353 // Count sheet: empty writable cells
354 $pdf->SetXY($this->posxqtyview, $curY - 1);
355 $pdf->MultiCell($this->posxgap - $this->posxqtyview - 1, 5, '', 1, 'R');
356 $pdf->SetXY($this->posxgap, $curY - 1);
357 $pdf->MultiCell($this->posxend - $this->posxgap, 5, '', 1, 'R');
358 }
359
360 $nexY = $curY + ($recorded ? 5 : 6);
361 }
362
363 // Totals
364 $pdf->SetFont('', 'B', $default_font_size - 1);
365 $curY = $nexY + 4;
366 if ($curY > ($this->page_hauteur - ($heightforfooter + $heightforinfotot + $heightforsignature))) {
367 $this->pageFoot($pdf, $object, $outputlangs, 1);
368 $pdf->AddPage();
369 $pagenb++;
370 $curY = $tab_top_newpage;
371 }
372 $pdf->SetXY($this->posxproduct, $curY);
373 $pdf->MultiCell(60, 4, $outputlangs->transnoentities("NbOfLines").' : '.$nblines, 0, 'L');
374 if ($recorded) {
375 $pdf->SetXY($this->posxproduct, $curY + 5);
376 $pdf->MultiCell(120, 4, $outputlangs->transnoentities("Difference").' : '.($totalgap > 0 ? '+' : '').price2num($totalgap, 'MS').' ('.$nbgap.' '.$outputlangs->transnoentities("Lines").')', 0, 'L');
377 $pdf->SetXY($this->posxproduct, $curY + 10);
378 $pdf->MultiCell(120, 4, $outputlangs->transnoentities("Valuation").' : '.price(price2num($totalgapvalue, 'MT'), 0, $outputlangs, 1, -1, -1, $conf->currency), 0, 'L');
379 }
380
381 // Signature block on count sheets
382 if (!$recorded) {
383 $posy = $curY + 8;
384 $pdf->SetFont('', '', $default_font_size - 1);
385 $pdf->SetXY($this->posxproduct, $posy);
386 $pdf->MultiCell(80, 4, $outputlangs->transnoentities("CountedBy").' : ____________________', 0, 'L');
387 $pdf->SetXY($this->page_largeur - $this->marge_droite - 80, $posy);
388 $pdf->MultiCell(80, 4, $outputlangs->transnoentities("DateAndSignature").' :', 0, 'L');
389 $pdf->Rect($this->page_largeur - $this->marge_droite - 80, $posy + 5, 80, 15);
390 }
391
392 // Page foot
393 $this->pageFoot($pdf, $object, $outputlangs, 0);
394 if (method_exists($pdf, 'AliasNbPages')) {
395 $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
396 }
397
398 $pdf->Close();
399
400 $pdf->Output($file, 'F');
401
402 // Add pdfgeneration hook
403 $hookmanager->initHooks(array('pdfgeneration'));
404 $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
405 global $action;
406 $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
407 if ($reshook < 0) {
408 $this->error = $hookmanager->error;
409 $this->errors = $hookmanager->errors;
410 }
411
412 dolChmod($file);
413
414 $this->result = array('fullpath' => $file);
415
416 return 1; // No error
417 }
418
428 protected function tableHeader(&$pdf, $tab_top, $outputlangs, $recorded)
429 {
430 global $conf;
431
432 $default_font_size = pdf_getPDFFontSize($outputlangs);
433
434 $pdf->SetFont('', 'B', $default_font_size - 2);
435 $pdf->SetDrawColor(128, 128, 128);
436 $pdf->line($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite, $tab_top);
437
438 $posy = $tab_top + 1;
439 $pdf->SetXY($this->posxproduct, $posy);
440 $pdf->MultiCell($this->posxlabel - $this->posxproduct - 1, 3, $outputlangs->transnoentities("ProductRef"), 0, 'L');
441 $pdf->SetXY($this->posxlabel, $posy);
442 $pdf->MultiCell($this->posxwarehouse - $this->posxlabel - 1, 3, $outputlangs->transnoentities("Label"), 0, 'L');
443 $pdf->SetXY($this->posxwarehouse, $posy);
444 $pdf->MultiCell($this->posxbatch - $this->posxwarehouse - 1, 3, $outputlangs->transnoentities("Warehouse"), 0, 'L');
445 $pdf->SetXY($this->posxbatch, $posy);
446 $pdf->MultiCell($this->posxqtystock - $this->posxbatch - 1, 3, $outputlangs->transnoentities("Batch"), 0, 'L');
447 $pdf->SetXY($this->posxqtystock, $posy);
448 $pdf->MultiCell($this->posxqtyview - $this->posxqtystock - 1, 3, $outputlangs->transnoentities("ExpectedQty"), 0, 'R');
449 $pdf->SetXY($this->posxqtyview, $posy);
450 $pdf->MultiCell($this->posxgap - $this->posxqtyview - 1, 3, $outputlangs->transnoentities("RealQty"), 0, 'R');
451 $pdf->SetXY($this->posxgap, $posy);
452 $pdf->MultiCell($this->posxend - $this->posxgap, 3, $outputlangs->transnoentities("Difference"), 0, 'R');
453
454 $pdf->line($this->marge_gauche, $tab_top + 6, $this->page_largeur - $this->marge_droite, $tab_top + 6);
455 }
456
468 protected function pageHead(&$pdf, $object, $showaddress, $outputlangs, $recorded, $isspecimen)
469 {
470 global $conf, $langs, $mysoc;
471
472 $default_font_size = pdf_getPDFFontSize($outputlangs);
473
474 pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
475
476 $pdf->SetTextColor(0, 0, 60);
477 $pdf->SetFont('', 'B', $default_font_size + 3);
478
479 $posy = $this->marge_haute;
480 $posx = $this->page_largeur - $this->marge_droite - 100;
481
482 $pdf->SetXY($this->marge_gauche, $posy);
483
484 // Logo
485 $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
486 if ($mysoc->logo) {
487 if (is_readable($logo)) {
488 $height = pdf_getHeightForLogo($logo);
489 $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto)
490 } else {
491 $pdf->SetTextColor(200, 0, 0);
492 $pdf->SetFont('', 'B', $default_font_size - 2);
493 $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
494 $pdf->SetTextColor(0, 0, 60);
495 }
496 } else {
497 $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($mysoc->name), 0, 'L');
498 }
499
500 $pdf->SetFont('', 'B', $default_font_size + 3);
501 $pdf->SetXY($posx, $posy);
502 $pdf->SetTextColor(0, 0, 60);
503 $title = $outputlangs->transnoentities("Inventory");
504 if (!$recorded) {
505 $title .= ' - '.$outputlangs->transnoentities("Draft");
506 }
507 $pdf->MultiCell(100, 4, $title, '', 'R');
508
509 $pdf->SetFont('', 'B', $default_font_size);
510 $posy += 5;
511 $pdf->SetXY($posx, $posy);
512 $pdf->SetTextColor(0, 0, 60);
513 $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".($isspecimen ? 'SPECIMEN' : $outputlangs->convToOutputCharset($object->ref)), '', 'R');
514
515 $pdf->SetFont('', '', $default_font_size - 1);
516
517 if (!$isspecimen && !empty($object->date_inventory)) {
518 $posy += 4;
519 $pdf->SetXY($posx, $posy);
520 $pdf->SetTextColor(0, 0, 60);
521 $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($this->db->jdate($object->date_inventory), "day", false, $outputlangs, true), '', 'R');
522 }
523 if (!$isspecimen && !empty($object->title)) {
524 $posy += 4;
525 $pdf->SetXY($posx, $posy);
526 $pdf->SetTextColor(0, 0, 60);
527 $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($object->title), '', 'R');
528 }
529
530 $pdf->SetTextColor(0, 0, 0);
531
532 return 0;
533 }
534
544 protected function pageFoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
545 {
546 $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
547 return pdf_pagefoot($pdf, $outputlangs, 'INVENTORY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
548 }
549}
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
Parent class for documents models.
Class to build inventory documents with model standard_inventory.
write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build pdf onto disk.
pageHead(&$pdf, $object, $showaddress, $outputlangs, $recorded, $isspecimen)
Show top header of page.
tableHeader(&$pdf, $tab_top, $outputlangs, $recorded)
Show table header.
pageFoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
Show footer of page.
global $mysoc
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
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.
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, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '...' if string larger than length.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
pdf_getFormat($outputlangs=null, $mode='setup')
Return array with format properties of default PDF format.
Definition pdf.lib.php:87
pdf_getPDFFontSize($outputlangs)
Return font size to use for PDF generation.
Definition pdf.lib.php:294
pdf_getHeightForLogo($logo, $url=false)
Return height to use for Logo onto PDF.
Definition pdf.lib.php:317
pdf_pagehead($pdf, $outputlangs, $page_height)
Show header of page for PDF generation.
Definition pdf.lib.php:790
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.
Definition pdf.lib.php:1464
pdf_getPDFFont($outputlangs)
Return font name to use for PDF generation.
Definition pdf.lib.php:273
pdf_getInstance($format='', $metric='mm', $pagetype='P')
Return a PDF instance object.
Definition pdf.lib.php:129
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
Definition repair.php:130
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:133