From 887c687dd1e9609ee9a6ee3438429b58e9f1df24 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Thu, 8 Mar 2018 17:30:25 +0100 Subject: [PATCH 1/2] Change dimension --- modules/labelgenerate/models/generatebarcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/labelgenerate/models/generatebarcode.php b/modules/labelgenerate/models/generatebarcode.php index b225afb8..7b987a1f 100644 --- a/modules/labelgenerate/models/generatebarcode.php +++ b/modules/labelgenerate/models/generatebarcode.php @@ -131,12 +131,12 @@ class GenerateBarcode $white = ImageColorAllocate($im, 0xff, 0xff, 0xff); imagefilledrectangle($im, 0, 0, $width, $height, $white); - imagettftext($im, 30, 0, 10, 50, $black, $font, $ref); + imagettftext($im, 40, 0, 10, 50, $black, $font, $ref); if ($id_product_attribute === null) { $result = imagegif($im, $this->directory.'/id-'.$id_product.'-0.gif'); } else { - imagettftext($im, 12, 0, 65, 50 , $black, $font, $attribute_ref); + imagettftext($im, 12, 0, 80, 50 , $black, $font, $attribute_ref); $result = imagegif($im, $this->directory.'/id-'.$id_product.'-'.$id_product_attribute.'.gif'); } From ba7f3d2223bef7e33b05b2253c847b78a5ef4cdd Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Thu, 8 Mar 2018 17:35:26 +0100 Subject: [PATCH 2/2] Test --- modules/labelgenerate/AdminLabelGenerate.php | 1 - modules/labelgenerate/models/generatebarcode.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/labelgenerate/AdminLabelGenerate.php b/modules/labelgenerate/AdminLabelGenerate.php index 3f89c998..69dc9074 100644 --- a/modules/labelgenerate/AdminLabelGenerate.php +++ b/modules/labelgenerate/AdminLabelGenerate.php @@ -505,7 +505,6 @@ class AdminLabelGenerate extends AdminTab $quantity += ($od['product_quantity'] - $od['product_quantity_reinjected']); } if ($quantity > 0) { - print_r($combination); $barcode->generateIdentification($combination['id_product'], $combination['id_product_attribute'], $product->reference, $combination['attribute_name']); $barcode->assocProduct($combination['id_product'], $combination['id_product_attribute'], $quantity, $product->reference); } diff --git a/modules/labelgenerate/models/generatebarcode.php b/modules/labelgenerate/models/generatebarcode.php index 7b987a1f..b3a8cabe 100644 --- a/modules/labelgenerate/models/generatebarcode.php +++ b/modules/labelgenerate/models/generatebarcode.php @@ -131,12 +131,12 @@ class GenerateBarcode $white = ImageColorAllocate($im, 0xff, 0xff, 0xff); imagefilledrectangle($im, 0, 0, $width, $height, $white); - imagettftext($im, 40, 0, 10, 50, $black, $font, $ref); + imagettftext($im, 40, 0, 10, 40, $black, $font, $ref); if ($id_product_attribute === null) { $result = imagegif($im, $this->directory.'/id-'.$id_product.'-0.gif'); } else { - imagettftext($im, 12, 0, 80, 50 , $black, $font, $attribute_ref); + imagettftext($im, 12, 0, 110, 40 , $black, $font, $attribute_ref); $result = imagegif($im, $this->directory.'/id-'.$id_product.'-'.$id_product_attribute.'.gif'); }