Bugzilla – Attachment 92482 Details for
Bug 23510
Allow QR codes to be used in label/patroncard creator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch to add QRcode functionality
0001-Allow-QR-codes-to-be-used-in-label-creator.diff (text/plain), 2.45 KB, created by
Theodoros Theodoropoulos
on 2019-08-27 13:13:34 UTC
(
hide
)
Description:
proposed patch to add QRcode functionality
Filename:
MIME Type:
Creator:
Theodoros Theodoropoulos
Created:
2019-08-27 13:13:34 UTC
Size:
2.45 KB
patch
obsolete
>--- a/src/C4/Labels/Label.pm 2018-09-20 12:15:04.678706379 +0300 >+++ b/src/C4/Labels/Label.pm 2019-08-27 15:44:20.682597996 +0300 >@@ -592,6 +592,23 @@ > warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@); > } > } >+ elsif ($params{'barcode_type'} eq 'QRCODE') { >+ eval { >+ PDF::Reuse::Barcode::QRcode( >+ x => $params{'llx'}, >+ y => $params{'lly'}, >+ value => sprintf('%013d',$params{barcode_data}), >+ mode => 'graphic', >+ text => '', >+ drawbackground => 0, >+ qr_version => 1, >+ modulesize => 1, >+ ); >+ }; >+ if ($@) { >+ warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@); >+ } >+ } > else { > warn "unknown barcode_type: $params{barcode_type}"; > } >@@ -653,6 +670,9 @@ > =item . > EAN13 = The standard EAN-13 barcode > >+=item . >+ QRCODE = The 2D QRcode barcode >+ > =back > > C<printing_type> Defines the general layout to be used on labels. NOTE: At present there are only five printing types supported in the label creator code: > >--- a/src/C4/Creators/Lib.pm 2018-06-29 12:49:04.824675960 +0300 >+++ b/src/C4/Creators/Lib.pm 2019-08-27 15:16:43.700311154 +0300 >@@ -97,6 +97,7 @@ > # {type => 'NW7', name => 'NW7', desc => 'Creates a NW7 barcodes from a string consisting of the numeric characters 0-9', selected => 0}, > # {type => 'UPCA', name => 'UPCA', desc => 'Translates a string of 11 or 12 digits to UPCA barcodes. The check number (the 12:th digit) is calculated if not supplied.', selected => 0}, > # {type => 'UPCE', name => 'UPCE', desc => 'Translates a string of 6, 7 or 8 digits to UPCE barcodes. If the string is 6 digits long, '0' is added first in the string. The check number (the 8:th digit) is calculated if not supplied.', selected => 0}, >+ {type => 'QRCODE', name => 'QRCODE', desc => 'Creates QRCode', selected => 0}, > ]; > > my $label_types = [
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 23510
:
92482
|
92488
|
92490