From c770900dacaa7ca564f01e67a2b7174e1ea5fb01 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Tue, 27 Dec 2016 14:49:18 +0100 Subject: [PATCH] fix size and margin --- .../labelgenerate/models/generatebarcode.php | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/modules/labelgenerate/models/generatebarcode.php b/modules/labelgenerate/models/generatebarcode.php index b4ae0776..9e526f71 100644 --- a/modules/labelgenerate/models/generatebarcode.php +++ b/modules/labelgenerate/models/generatebarcode.php @@ -153,7 +153,7 @@ class GenerateBarcode { // 'key' => "125415-323", // 'label' => "06 mois (68 cm)- Lot de 2 bodies Ri", // "ref" => "FIX-06-86763", - // "decli" => '06 mois (68 cm)-' + // "decli" => '06 mois (68 cm)' // ); // } // for ($i=61; $i < 80; $i++) { @@ -161,7 +161,7 @@ class GenerateBarcode { // 'key' => "125416-332", // 'label' => "03 mois (62 cm) - Ensemble grenouill", // "ref" => "FIX-04-86763", - // "decli" => '' + // "decli" => '03 mois (62 cm)' // ); // } // for ($i=81; $i < 100; $i++) { @@ -169,7 +169,7 @@ class GenerateBarcode { // 'key' => "125415-322", // 'label' => "03 mois (62 cm) - Ensemble grenouill", // "ref" => "FIX-06-86763", - // "decli" => '03 mois (62 cm)-' + // "decli" => '03 mois (62 cm)' // ); // } // for ($i=101; $i < 145; $i++) { @@ -177,7 +177,7 @@ class GenerateBarcode { // 'key' => "125417-325", // 'label' => "06 mois (68 cm) - Ensemble grenouill", // "ref" => "FIX-18-32094", - // "decli" => '06 mois (68 cm)-' + // "decli" => '06 mois (68 cm)' // ); // } // for ($i=146; $i < 206; $i++) { @@ -185,7 +185,7 @@ class GenerateBarcode { // 'key' => "125417", // 'label' => "06 mois (68 cm) - Ensemble grenouill", // "ref" => "FIX-16-32094", - // "decli" => '' + // "decli" => '06 mois (68 cm)' // ); // } @@ -225,25 +225,33 @@ class GenerateBarcode { $pdf->Cell(48, 4, '', 0,0, 'C'); } elseif($generate_ref) { $pdf->SetFont('Arial', '', 7); - $pdf->Cell(48, 4, substr(utf8_decode($product['decli']), 0, 35), 0,0, 'C'); + $pdf->Cell(48, 6, substr(utf8_decode($product['decli']), 0, 35), 0,0, 'C'); } else { $this->_printLabel($pdf, $product['label'], 1); } } - $pdf->Ln(4); + if($generate_ref) { + $pdf->Ln(6); + } else { + $pdf->Ln(4); + } foreach ($product_per_line as $key => $product) { if (empty($product)) { $pdf->Cell(48, 10, '', 0,0, 'C'); } elseif($generate_ref) { $pdf->SetFont('Arial', '', 7); - $pdf->Cell(48, 10, $product['ref'], 0,0, 'C'); + $pdf->Cell(48, 8, $product['ref'], 0,0, 'C'); } else { $ean_image = $this->directory.'/ean-'.$product['key'].'.gif'; $this->_printEAN($pdf, $ean_image, 1); } } - $pdf->Ln(13); + if($generate_ref) { + $pdf->Ln(11); + } else { + $pdf->Ln(13); + } $nb_per_page += 1; }