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

(-)a/C4/Circulation.pm (+3 lines)
Lines 167-172 System Pref options. Link Here
167
#
167
#
168
sub barcodedecode {
168
sub barcodedecode {
169
    my ($barcode, $filter) = @_;
169
    my ($barcode, $filter) = @_;
170
171
    return unless defined $barcode;
172
170
    my $branch = C4::Context::mybranch();
173
    my $branch = C4::Context::mybranch();
171
    $barcode =~ s/^\s+|\s+$//g;
174
    $barcode =~ s/^\s+|\s+$//g;
172
    $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter;
175
    $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter;
(-)a/t/Circulation_barcodedecode.t (-2 / +7 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 28;
20
use Test::More tests => 29;
21
use Test::Warn;
21
22
22
use C4::Context;
23
use C4::Context;
23
use t::lib::Mocks;
24
use t::lib::Mocks;
Lines 55-60 foreach my $filter (@filters) { Link Here
55
    }
56
    }
56
}
57
}
57
58
59
warnings_are
60
    { C4::Circulation::barcodedecode(undef); }
61
    [],
62
    'No warnings with undef barcode';
63
58
# T-prefix style is derived from zero-padded "Follett Classic Code 3 of 9".  From:
64
# T-prefix style is derived from zero-padded "Follett Classic Code 3 of 9".  From:
59
#     www.fsc.follett.com/_file/File/pdf/Barcode%20Symbology%20Q%20%20A%203_05.pdf
65
#     www.fsc.follett.com/_file/File/pdf/Barcode%20Symbology%20Q%20%20A%203_05.pdf
60
#  ~ 1 to 7 characters
66
#  ~ 1 to 7 characters
61
- 

Return to bug 30409