Skip to content

Commit

Permalink
FIX nblignes not calculated after hook and hook can't modify this val…
Browse files Browse the repository at this point in the history
…ue. Usefull for modules
  • Loading branch information
atm-arnaud committed Jan 14, 2016
1 parent d98415f commit 8b2541e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htdocs/core/modules/facture/doc/pdf_crabe.modules.php
Expand Up @@ -250,6 +250,9 @@ function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hid
global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks

// Set nblignes with the new facture lines content after hook
$nblignes = count($object->lines);

// Create pdf instance
$pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
Expand Down

0 comments on commit 8b2541e

Please sign in to comment.