Work on nblignes -> nblines

This commit is contained in:
Laurent Destailleur
2019-06-29 16:29:32 +02:00
parent b37f55d13a
commit adb3062a9f
73 changed files with 230 additions and 235 deletions

View File

@@ -131,7 +131,7 @@ class pdf_squille extends ModelePdfReception
$outputlangs->load("receptions");
$outputlangs->load("productbatch");
$nblignes = count($object->lines);
$nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show
$realpatharray=array();
@@ -139,7 +139,7 @@ class pdf_squille extends ModelePdfReception
{
$objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++)
for ($i = 0 ; $i < $nblines ; $i++)
{
if (empty($object->lines[$i]->fk_product)) continue;
@@ -217,7 +217,7 @@ class pdf_squille extends ModelePdfReception
$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);
$nblines = count($object->lines);
$pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs);
@@ -357,7 +357,7 @@ class pdf_squille extends ModelePdfReception
$fk_commandefourndet=0;
$totalOrdered=0;
// Loop on each lines
for ($i = 0; $i < $nblignes; $i++)
for ($i = 0; $i < $nblines; $i++)
{
$curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@@ -416,7 +416,7 @@ class pdf_squille extends ModelePdfReception
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page
if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{
$pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -496,7 +496,7 @@ class pdf_squille extends ModelePdfReception
if ($weighttxt && $voltxt) $nexY+=2;
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));