171 public function write_file(
$object, $outputlangs, $srctemplatepath =
'', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
174 global $user, $langs,
$conf,
$mysoc, $db, $hookmanager;
176 if (!is_object($outputlangs)) {
177 $outputlangs = $langs;
181 $outputlangs->charset_output =
'ISO-8859-1';
185 $outputlangs->loadLangs(array(
"main",
"dict",
"companies",
"bills",
"stocks",
"orders",
"sendings"));
187 if (
$conf->stock->dir_output) {
190 $dir =
$conf->stock->dir_output;
191 $file = $dir.
"/SPECIMEN.pdf";
194 $dir =
$conf->stock->dir_output.
"/".$objectref;
195 $file = $dir.
"/".$objectref.
".pdf";
198 $productstatic =
new Product($this->db);
200 if (!file_exists($dir)) {
202 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
207 if (file_exists($dir)) {
209 if (!is_object($hookmanager)) {
210 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
213 $hookmanager->initHooks(array(
'pdfgeneration'));
214 $parameters = array(
'file' => $file,
'object' =>
$object,
'outputlangs' => $outputlangs);
216 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters,
$object, $action);
221 $pdf->setAutoPageBreak(
true, 0);
223 $heightforinfotot = 40;
225 $heightforfooter = $this->marge_basse + 8;
227 $heightforfooter += 6;
230 if (class_exists(
'TCPDF')) {
231 $pdf->setPrintHeader(
false);
232 $pdf->setPrintFooter(
false);
237 $pagecount = $pdf->setSourceFile(
$conf->mycompany->dir_output.
'/' .
getDolGlobalString(
'MAIN_ADD_PDF_BACKGROUND'));
238 $tplidx = $pdf->importPage(1);
243 $pdf->SetDrawColor(128, 128, 128);
245 $pdf->SetTitle($outputlangs->convToOutputCharset(
$object->ref));
246 $pdf->SetSubject($outputlangs->transnoentities(
"Stock"));
247 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
248 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getAnonymisableFullName($outputlangs)));
249 $pdf->SetKeyWords($outputlangs->convToOutputCharset(
$object->ref).
" ".$outputlangs->transnoentities(
"Stock").
" ".$outputlangs->convToOutputCharset(
$object->label));
251 $pdf->SetCompression(
false);
255 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
260 if (!empty($tplidx)) {
261 $pdf->useTemplate($tplidx);
265 $pdf->SetFont(
'',
'', $default_font_size - 1);
266 $pdf->MultiCell(0, 3,
'');
267 $pdf->SetTextColor(0, 0, 0);
269 $tab_top = 65 + $top_shift;
270 $tab_top_newpage = (!
getDolGlobalInt(
'MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
272 $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
278 $totalvalue = $totalvaluesell = 0;
280 $sortfield =
'p.ref';
283 $sql =
"SELECT p.rowid as rowid, p.ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.pmp as ppmp, p.price, p.price_ttc, p.entity,";
284 $sql .=
" ps.reel as value";
285 $sql .=
" FROM ".MAIN_DB_PREFIX.
"product_stock as ps, ".MAIN_DB_PREFIX.
"product as p";
286 $sql .=
" WHERE ps.fk_product = p.rowid";
287 $sql .=
" AND ps.reel <> 0";
288 $sql .=
" AND ps.fk_entrepot = ".((int)
$object->id);
289 $sql .= $this->db->order($sortfield, $sortorder);
292 $resql = $this->db->query($sql);
294 $num = $this->db->num_rows($resql);
297 $nexY = $tab_top + $this->tabTitleHeight;
299 for ($i = 0; $i < $nblines; $i++) {
302 $objp = $this->db->fetch_object($resql);
306 $sql =
"SELECT label";
307 $sql .=
" FROM ".MAIN_DB_PREFIX.
"product_lang";
308 $sql .=
" WHERE fk_product = ".((int) $objp->rowid);
309 $sql .=
" AND lang = '".$this->db->escape($langs->getDefaultLang()).
"'";
312 $result = $this->db->query($sql);
314 $objtp = $this->db->fetch_object($result);
315 if ($objtp->label !=
'') {
316 $objp->produit = $objtp->label;
321 $pdf->SetFont(
'',
'', $default_font_size - 1);
322 $pdf->SetTextColor(0, 0, 0);
324 $pdf->setTopMargin($tab_top_newpage);
325 $pdf->setPageOrientation(
'',
true, $heightforfooter + $heightforfreetext + $heightforinfotot);
326 $pageposbefore = $pdf->getPage();
329 $curX = $this->posxdesc - 1;
331 $showpricebeforepagebreak = 1;
333 $pdf->startTransaction();
334 $pdf->writeHTMLCell($this->wref, 3, $curX, $curY, $outputlangs->convToOutputCharset($objp->ref), 0, 1,
false,
true,
'J',
true);
336 $pageposafter = $pdf->getPage();
337 if ($pageposafter > $pageposbefore) {
338 $pdf->rollbackTransaction(
true);
339 $pageposafter = $pageposbefore;
341 $pdf->setPageOrientation(
'',
true, $heightforfooter);
342 $pdf->writeHTMLCell($this->wref, 4, $curX, $curY, $outputlangs->convToOutputCharset($objp->ref), 0, 1,
false,
true,
'J',
true);
344 $pageposafter = $pdf->getPage();
345 $posyafter = $pdf->GetY();
346 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {
347 if ($i == ($nblines - 1)) {
348 $pdf->AddPage(
'',
'',
true);
349 if (!empty($tplidx)) {
350 $pdf->useTemplate($tplidx);
355 $pdf->setPage($pageposafter + 1);
362 $showpricebeforepagebreak = 1;
364 $showpricebeforepagebreak = 0;
368 $pdf->commitTransaction();
370 $posYAfterDescription = $pdf->GetY();
372 $nexY = $pdf->GetY();
373 $pageposafter = $pdf->getPage();
375 $pdf->setPage($pageposbefore);
376 $pdf->setTopMargin($this->marge_haute);
377 $pdf->setPageOrientation(
'',
true, 0);
380 if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
381 $pdf->setPage($pageposafter);
382 $curY = $tab_top_newpage;
385 $pdf->SetFont(
'',
'', $default_font_size - 1);
387 $productstatic->id = $objp->rowid;
388 $productstatic->ref = $objp->ref;
389 $productstatic->label = $objp->produit;
390 $productstatic->type = $objp->type;
391 $productstatic->entity = $objp->entity;
392 $productstatic->status_batch = $objp->tobatch;
399 $pdf->SetXY($this->posxlabel + 0.8, $curY);
400 $pdf->MultiCell($this->posxqty - $this->posxlabel - 0.8, 3,
dol_trunc($productstatic->label, 24), 0,
'L');
403 $valtoshow =
price2num($objp->value,
'MS');
404 $towrite = (empty($valtoshow) ?
'0' : $valtoshow);
406 $pdf->SetXY($this->posxqty, $curY);
407 $pdf->MultiCell($this->posxup - $this->posxqty - 0.8, 3, $towrite, 0,
'R');
410 $totalunit += $objp->value;
412 $pdf->SetXY($this->posxup, $curY);
413 $pdf->MultiCell($this->posxunit - $this->posxup - 0.8, 3,
price(
price2num($objp->ppmp,
'MU'), 0, $outputlangs), 0,
'R');
416 $pdf->SetXY($this->posxunit, $curY);
417 $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 3,
price(
price2num($objp->ppmp * $objp->value,
'MT'), 0, $outputlangs), 0,
'R');
418 $totalvalue +=
price2num($objp->ppmp * $objp->value,
'MT');
423 $pricemin = $objp->price;
424 $pdf->SetXY($this->posxdiscount, $curY);
425 $pdf->MultiCell($this->postotalht - $this->posxdiscount, 3,
price(
price2num($pricemin,
'MU'), 0, $outputlangs), 0,
'R',
false);
428 $pdf->SetXY($this->postotalht, $curY);
429 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3,
price(
price2num($pricemin * $objp->value,
'MT'), 0, $outputlangs), 0,
'R',
false);
431 $totalvaluesell +=
price2num($pricemin * $objp->value,
'MT');
435 $pdf->setPage($pageposafter);
436 $pdf->SetLineStyle(array(
'dash' =>
'1,1',
'color' => array(80, 80, 80)));
438 $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
439 $pdf->SetLineStyle(array(
'dash' => 0));
445 while ($pagenb < $pageposafter) {
446 $pdf->setPage($pagenb);
448 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1,
$object->multicurrency_code);
450 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1,
$object->multicurrency_code);
454 $pdf->setPage($pagenb);
455 $pdf->setPageOrientation(
'',
true, 0);
459 if (!empty($tplidx)) {
460 $pdf->useTemplate($tplidx);
463 if (isset(
$object->lines[$i + 1]->pagebreak) &&
$object->lines[$i + 1]->pagebreak) {
465 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1,
$object->multicurrency_code);
467 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1,
$object->multicurrency_code);
472 if (!empty($tplidx)) {
473 $pdf->useTemplate($tplidx);
482 $this->db->free($resql);
492 $pdf->SetLineStyle(array(
'dash' =>
'0',
'color' => array(200, 200, 200)));
493 $pdf->line($this->marge_gauche, $curY - 1, $this->page_largeur - $this->marge_droite, $curY - 1);
494 $pdf->SetLineStyle(array(
'dash' => 0));
496 $pdf->SetFont(
'',
'B', $default_font_size - 1);
497 $pdf->SetTextColor(0, 0, 0);
500 $pdf->SetXY($this->posxdesc, $curY);
501 $pdf->MultiCell($this->wref, 3, $langs->trans(
"Total"), 0,
'L');
504 $valtoshow =
price2num($totalunit,
'MS');
505 $towrite = empty($valtoshow) ?
'0' : $valtoshow;
507 $pdf->SetXY($this->posxqty, $curY);
508 $pdf->MultiCell($this->posxup - $this->posxqty - 0.8, 3, $towrite, 0,
'R');
511 $pdf->SetXY($this->posxunit, $curY);
512 $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 3,
price(
price2num($totalvalue,
'MT'), 0, $outputlangs), 0,
'R');
517 $pdf->SetXY($this->postotalht, $curY);
518 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3,
price(
price2num($totalvaluesell,
'MT'), 0, $outputlangs), 0,
'R',
false);
526 $notetoshow = empty(
$object->note_public) ?
'' :
$object->note_public;
536 $pdf->SetFont(
'',
'', $default_font_size - 1);
537 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top,
dol_htmlentitiesbr($notetoshow), 0, 1);
538 $nexY = $pdf->GetY();
539 $height_note = $nexY - $tab_top;
542 $pdf->SetDrawColor(192, 192, 192);
543 $pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius,
'1234',
'D');
545 $tab_height -= $height_note;
546 $tab_top = $nexY + 6;
559 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0,
$object->multicurrency_code);
560 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
562 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0,
$object->multicurrency_code);
563 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
566 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
576 if (method_exists($pdf,
'AliasNbPages')) {
577 $pdf->AliasNbPages();
582 $pdf->Output($file,
'F');
585 $hookmanager->initHooks(array(
'pdfgeneration'));
586 $parameters = array(
'file' => $file,
'object' =>
$object,
'outputlangs' => $outputlangs);
588 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
589 $this->warnings = $hookmanager->warnings;
591 $this->error = $hookmanager->error;
592 $this->errors = $hookmanager->errors;
599 $this->result = array(
'fullpath' => $file);
603 $this->error = $langs->trans(
"ErrorCanNotCreateDir", $dir);
607 $this->error = $langs->trans(
"ErrorConstantNotDefined",
"PRODUCT_OUTPUTDIR");
626 protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency =
'')
636 $currency = !empty($currency) ? $currency :
$conf->currency;
640 $pdf->SetTextColor(0, 0, 0);
641 $pdf->SetFont(
'',
'', $default_font_size - 2);
643 if (empty($hidetop)) {
644 $titre = $outputlangs->transnoentities(
"AmountInCurrency", $outputlangs->transnoentitiesnoconv(
"Currency".$currency));
645 $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
646 $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
650 $pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius,
'1001',
'F', array(), explode(
',',
getDolGlobalString(
'MAIN_PDF_TITLE_BACKGROUND_COLOR')));
654 $pdf->SetDrawColor(128, 128, 128);
656 $pdf->SetFont(
'',
'B', $default_font_size - 3);
659 $this->
printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom,
'D');
661 $pdf->SetLineStyle(array(
'dash' =>
'0',
'color' => array(200, 200, 200)));
662 $pdf->SetDrawColor(200, 200, 200);
663 $pdf->line($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite, $tab_top);
664 $pdf->SetLineStyle(array(
'dash' => 0));
665 $pdf->SetDrawColor(128, 128, 128);
666 $pdf->SetTextColor(0, 0, 0);
669 if (empty($hidetop)) {
670 $pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11);
671 $pdf->SetXY($this->posxdesc - 1, $tab_top + 1);
672 $pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities(
"Ref"),
'',
'L');
675 $pdf->line($this->posxlabel - 1, $tab_top, $this->posxlabel - 1, $tab_top + $tab_height);
676 if (empty($hidetop)) {
677 $pdf->SetXY($this->posxlabel - 1, $tab_top + 1);
678 $pdf->MultiCell($this->posxqty - $this->posxlabel - 1, 2, $outputlangs->transnoentities(
"Label"),
'',
'C');
681 $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height);
682 if (empty($hidetop)) {
683 $pdf->SetXY($this->posxqty - 1, $tab_top + 1);
684 $pdf->MultiCell($this->posxup - $this->posxqty - 1, 2, $outputlangs->transnoentities(
"Units"),
'',
'C');
687 $pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height);
688 if (empty($hidetop)) {
689 $pdf->SetXY($this->posxup - 1, $tab_top + 1);
690 $pdf->MultiCell($this->posxunit - $this->posxup - 1, 2, $outputlangs->transnoentities(
"AverageUnitPricePMPShort"),
'',
'C');
693 $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
694 if (empty($hidetop)) {
695 $pdf->SetXY($this->posxunit - 1, $tab_top + 1);
696 $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities(
"EstimatedStockValueShort"),
'',
'C');
699 $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height);
700 if (empty($hidetop)) {
701 $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1);
702 $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities(
"SellPriceMin"),
'',
'C');
705 $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
706 if (empty($hidetop)) {
707 $pdf->SetXY($this->postotalht - 1, $tab_top + 1);
708 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 2, $outputlangs->transnoentities(
"EstimatedStockValueSellShort"),
'',
'C');
711 if (empty($hidetop)) {
712 $pdf->SetDrawColor(200, 200, 200);
713 $pdf->SetLineStyle(array(
'dash' =>
'0',
'color' => array(200, 200, 200)));
714 $pdf->line($this->marge_gauche, $tab_top + $this->tabTitleHeight, $this->page_largeur - $this->marge_droite, $tab_top + $this->tabTitleHeight);
715 $pdf->SetLineStyle(array(
'dash' => 0));
732 global
$conf, $langs;
735 $outputlangs->loadLangs(array(
"main",
"propal",
"companies",
"bills",
"orders",
"stocks"));
743 pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur,
'mm',
$conf->global->STOCK_DRAFT_WATERMARK);
746 $pdf->SetTextColor(0, 0, 60);
747 $pdf->SetFont(
'',
'B', $default_font_size + 3);
749 $posy = $this->marge_haute;
750 $posx = $this->page_largeur - $this->marge_droite - 100;
752 $pdf->SetXY($this->marge_gauche, $posy);
756 $logo =
$conf->mycompany->dir_output.
'/logos/'.$this->emetteur->logo;
757 if ($this->emetteur->logo) {
758 if (is_readable($logo)) {
760 $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
762 $pdf->SetTextColor(200, 0, 0);
763 $pdf->SetFont(
'',
'B', $default_font_size - 2);
764 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ErrorLogoFileNotFound", $logo), 0,
'L');
765 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ErrorGoToGlobalSetup"), 0,
'L');
768 $text = $this->emetteur->name;
769 $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0,
'L');
772 $yafterleft = $pdf->GetY() + $height;
774 $pdf->SetFont(
'',
'B', $default_font_size + 3);
775 $pdf->SetXY($posx, $posy);
776 $pdf->SetTextColor(0, 0, 60);
778 $pdf->MultiCell(100, 4, $outputlangs->transnoentities(
"Warehouse").
' '.$outputlangs->convToOutputCharset(
$object->label),
'',
'R');
781 $pdf->SetFont(
'',
'', $default_font_size - 1);
782 $pdf->SetXY($posx, $posy);
783 $pdf->SetTextColor(0, 0, 60);
785 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"Label").
' : '.
$object->lieu,
'',
'R');
790 $pdf->SetXY($posx, $posy);
791 $pdf->SetTextColor(0, 0, 60);
795 $hasparent = (!empty(
$object->fk_parent) && $e->fetch(
$object->fk_parent) > 0);
798 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ParentWarehouse").
' :',
'',
'R');
801 $pdf->SetXY($posx - 50, $posy);
802 $pdf->MultiCell(150, 3, $e->label,
'',
'R');
805 $yafterright = $pdf->GetY();
808 $nbpage = $pdf->getPage();
810 $nexY = max($yafterleft, $yafterright);
812 $pdf->SetXY($posx, $posy);
813 $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY,
'<b>'.$outputlangs->transnoentities(
"Description").
' : </b>'.nl2br(
$object->description), 0, 1);
814 $nexY = $pdf->GetY();
816 $calcproductsunique =
$object->nb_different_products();
817 $calcproducts =
$object->nb_products();
820 $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY,
'<b>'.$outputlangs->transnoentities(
"NumberOfDifferentProducts").
' : </b>'.(empty($calcproductsunique[
'nb']) ?
'0' : $calcproductsunique[
'nb']), 0, 1);
821 $nexY = $pdf->GetY();
824 $valtoshow =
price2num($calcproducts[
'nb'],
'MS');
825 $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY,
'<b>'.$outputlangs->transnoentities(
"NumberOfProducts").
' : </b>'.(empty($valtoshow) ?
'0' : $valtoshow), 0, 1);
826 $nexY = $pdf->GetY();
829 $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY,
'<b>'.$outputlangs->transnoentities(
"EstimatedStockValueShort").
' : </b>'.
price((empty($calcproducts[
'value']) ?
'0' :
price2num($calcproducts[
'value'],
'MT')), 0, $langs, 0, -1, -1,
$conf->currency), 0, 1);
830 $nexY = $pdf->GetY();
833 $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY,
'<b>'.$outputlangs->transnoentities(
"Date").
' : </b>'.
dol_print_date(
dol_now(),
'dayhour'), 0, 1);
834 $nexY = $pdf->GetY();
837 $sql =
"SELECT max(m.datem) as datem";
838 $sql .=
" FROM ".MAIN_DB_PREFIX.
"stock_mouvement as m";
839 $sql .=
" WHERE m.fk_entrepot = ".((int)
$object->id);
840 $lastmovementdate = 0;
841 $resqlbis = $this->db->query($sql);
843 $obj = $this->db->fetch_object($resqlbis);
844 $lastmovementdate = $this->db->jdate($obj->datem);
849 if ($lastmovementdate) {
852 $toWrite = $outputlangs->transnoentities(
"None");
855 $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY,
'<b>'.$outputlangs->transnoentities(
"LastMovement").
' : </b>'.$toWrite, 0, 1);
857 $nexY = $pdf->GetY();
863 $current_y = $pdf->getY();
865 if ($current_y < $pdf->getY()) {
866 $top_shift = $pdf->getY() - $current_y;
869 $pdf->SetTextColor(0, 0, 0);