View | Details | Raw Unified | Return to bug 23510
Collapse All | Expand All

(-)a/src/C4/Labels/Label.pm (+20 lines)
Lines 592-597 Link Here
592
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
592
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
593
        }
593
        }
594
    }
594
    }
595
    elsif ($params{'barcode_type'} eq 'QRCODE') {
596
        eval {
597
            PDF::Reuse::Barcode::QRcode(
598
                x                   => $params{'llx'},
599
                y                   => $params{'lly'},
600
                value               => $params{barcode_data},
601
		mode                => 'graphic',
602
                text                => '',
603
                drawbackground      => 0,
604
                qr_version          => 1,
605
                modulesize          => 1,
606
            );
607
        };
608
        if ($@) {
609
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
610
        }
611
    }
595
    else {
612
    else {
596
    warn "unknown barcode_type: $params{barcode_type}";
613
    warn "unknown barcode_type: $params{barcode_type}";
597
    }
614
    }
Lines 653-658 Link Here
653
=item .
670
=item .
654
            EAN13           = The standard EAN-13 barcode
671
            EAN13           = The standard EAN-13 barcode
655
672
673
=item .
674
            QRCODE          = The 2D QRcode barcode
675
656
=back
676
=back
657
677
658
        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:
678
        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 (+1 lines)
Lines 97-102 Link Here
97
#    {type => 'NW7',             name => 'NW7',                  desc => 'Creates a NW7 barcodes from a string consisting of the numeric characters 0-9',                                                                        selected => 0},
97
#    {type => 'NW7',             name => 'NW7',                  desc => 'Creates a NW7 barcodes from a string consisting of the numeric characters 0-9',                                                                        selected => 0},
98
#    {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},
98
#    {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},
99
#    {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},
99
#    {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},
100
    {type => 'QRCODE',            name => 'QRCODE',                 desc => 'Creates version 1 with modulesize=1 (small) QRCode',                                 selected => 0},
100
];
101
];
101
102
102
my $label_types = [
103
my $label_types = [
(-)a/src/C4/Patroncards/Patroncard.pm (+17 lines)
Lines 422-427 Link Here
422
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
422
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
423
        }
423
        }
424
    }
424
    }
425
    elsif ( $params{'barcode_type'} eq 'QRCODE' ) {
426
        eval {
427
            PDF::Reuse::Barcode::QRcode(
428
                x                   => $params{'llx'}* $self->{'unitvalue'},
429
                y                   => $params{'lly'}* $self->{'unitvalue'},
430
                value               => $params{barcode_data},
431
		 mode                => 'graphic',
432
                text                => '',
433
                drawbackground      => 0,
434
                qr_version          => 1,
435
                modulesize          => 1,
436
            );
437
        };
438
        if ($@) {
439
            warn sprintf('Barcode generation failed for item %s with this error: %s', $self->{'item_number'}, $@);
440
        }
441
    }
425
}
442
}
426
443
427
1;
444
1;

Return to bug 23510