Bugzilla – Attachment 155391 Details for
Bug 34732
Barcode image generator doesn't generate correct Code39 barcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34732: For Code39, append or prepend asterisk if missing from barcode
Bug-34732-For-Code39-append-or-prepend-asterisk-if.patch (text/plain), 1.61 KB, created by
Matt Blenkinsop
on 2023-09-08 10:07:16 UTC
(
hide
)
Description:
Bug 34732: For Code39, append or prepend asterisk if missing from barcode
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-09-08 10:07:16 UTC
Size:
1.61 KB
patch
obsolete
>From 81388f853e06b3083ccaa75a3748273b0830e0b4 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 8 Sep 2023 02:19:20 +0000 >Subject: [PATCH] Bug 34732: For Code39, append or prepend asterisk if missing > from barcode > >This patch appends or prepends an asterisk on Code39 barcodes if >they are missing from the input. This is so that they form correct >Code39 barcode images. > >Test plan: >0. Apply the patch >1. koha-plack --reload kohadev >2. Go to http://localhost:8081/cgi-bin/koha/labels/barcode-print.pl >3. Type 39999000001310 into "Barcode" and click "Show barcode" >4. Note that the barcode text on the right includes asterisks around it >5. Type *39999000001310 into "Barcode" and click "Show barcode" >6. Note the same as above >7. Type 39999000001310* into "Barcode" and click "Show barcode" >8. Note the same as above >9. Type *39999000001310* into "Barcode" and click "Show barcode" >10. Note the same as above > >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >--- > svc/barcode | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/svc/barcode b/svc/barcode >index bd9c8203bc..e51a29f7f6 100755 >--- a/svc/barcode >+++ b/svc/barcode >@@ -106,6 +106,11 @@ my $height = $input->param('height') || 50; > my $qrcode_modulesize = $input->param('modulesize') || "5"; # 1+ > my $image; > >+if ($type eq 'Code39'){ >+ $barcode = '*' . $barcode unless $barcode =~ /^\*/; >+ $barcode = $barcode . '*' unless $barcode =~ /\*$/; >+} >+ > eval { > if( $type eq "QRcode" ){ > $image = GD::Barcode->new('QRcode', $barcode, { Ecc => "M", ModuleSize => $qrcode_modulesize } )->plot->png(); >-- >2.37.1 (Apple Git-137.1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34732
:
155281
|
155282
|
155350
|
155391
|
155708
|
155709