diff options
author | cos <cos> | 2015-01-25 23:36:46 +0100 |
---|---|---|
committer | cos <cos> | 2015-01-25 23:36:46 +0100 |
commit | f1020f3096ecff934ad93bb78ba597ff4249e068 (patch) | |
tree | c4fe15e505b42a215ca3eb5a92daabedfd36260b | |
parent | 84e3857e881a8f3e665df837e6c8d3c06fe61b7b (diff) | |
download | mat-f1020f3096ecff934ad93bb78ba597ff4249e068.zip |
Optimize strings on labels, to prepare to fit more information.
-rwxr-xr-x | mat | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -282,18 +282,18 @@ sub print_label { my $iconv = Text::Iconv->new("UTF-8", "ISO8859-1"); my $latin1_dish = $iconv->convert($dish_name); - my $row0 = $Config{'label_name'}; + my $row0 = $Config{'label_name'}." ".$preparation_date; my $row1; my $row2; if( length($latin1_dish) < 15) { $row1 = $latin1_dish; - $row2 = ""; + $row2 = "(".$amount."g)"; } else { $row1 = $latin1_dish; $row1 =~ s/(.{15,23}) .*/$1/; - $row2 = substr($latin1_dish, (length $row1) + 1); + $row2 = substr($latin1_dish, (length $row1) + 1).' ('.$amount.'g)'; } - my $row3 = $preparation_date.' ('.$amount.'g)'; + my $row3 = '<available label space>'; my $idbarcode = GD::Barcode::QRcode->new(sprintf("%s%d", $Config{'label_id_prefix'}, $id), { Version=>3 }); my $idbarcode_image=$idbarcode->plot(); |