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

(-)a/C4/ILSDI/Services.pm (-2 / +1 lines)
Lines 642-649 sub GetServices { Link Here
642
642
643
    # Issuing management
643
    # Issuing management
644
    my $barcode = $item->barcode || '';
644
    my $barcode = $item->barcode || '';
645
    $barcode = barcodedecode($barcode) if ( $barcode && C4::Context->preference('itemBarcodeInputFilter') );
645
    $barcode = barcodedecode($barcode) if $barcode;
646
    ($barcode) = Koha::Plugins->call('item_barcode_transform', $barcode ) || $barcode;
647
    if ($barcode) {
646
    if ($barcode) {
648
        my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $barcode );
647
        my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $barcode );
649
648
(-)a/Koha/Item.pm (-2 / +1 lines)
Lines 90-97 sub store { Link Here
90
        $self->itype($self->biblio->biblioitem->itemtype);
90
        $self->itype($self->biblio->biblioitem->itemtype);
91
    }
91
    }
92
92
93
    my ($transformed_barcode) = Koha::Plugins->call( 'item_barcode_transform', $self->barcode ) || $self->barcode;
93
    $self->barcode( barcodedecode( $self->barcode ) );
94
    $self->barcode($transformed_barcode);
95
94
96
    my $today  = dt_from_string;
95
    my $today  = dt_from_string;
97
    my $action = 'create';
96
    my $action = 'create';
(-)a/cataloguing/additem.pl (-2 / +1 lines)
Lines 510-517 if ($op eq "additem") { Link Here
510
510
511
    my $addedolditem = TransformMarcToKoha( $record );
511
    my $addedolditem = TransformMarcToKoha( $record );
512
512
513
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $addedolditem->{'barcode'} ) || $addedolditem->{'barcode'};
513
    $addedolditem->{barcode} = barcodedecode( $addedolditem->{barcode} );
514
    $addedolditem->{'barcode'} = $new_barcode;
515
514
516
    # If we have to add or add & duplicate, we add the item
515
    # If we have to add or add & duplicate, we add the item
517
    if ( $add_submit || $add_duplicate_submit ) {
516
    if ( $add_submit || $add_duplicate_submit ) {
(-)a/circ/circulation.pl (-3 / +1 lines)
Lines 164-172 if (C4::Context->preference("DisplayClearScreenButton")) { Link Here
164
164
165
for my $barcode ( @$barcodes ) {
165
for my $barcode ( @$barcodes ) {
166
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
166
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
167
    $barcode = barcodedecode($barcode)
167
    $barcode = barcodedecode( $barcode ) if $barcode;
168
        if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
169
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
170
}
168
}
171
169
172
my $stickyduedate  = $query->param('stickyduedate') || $session->param('stickyduedate');
170
my $stickyduedate  = $query->param('stickyduedate') || $session->param('stickyduedate');
(-)a/circ/returns.pl (-4 / +2 lines)
Lines 115-122 foreach ( $query->param ) { Link Here
115
115
116
    # decode barcode    ## Didn't we already decode them before passing them back last time??
116
    # decode barcode    ## Didn't we already decode them before passing them back last time??
117
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
117
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
118
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
118
    $barcode = barcodedecode($barcode) if $barcode;
119
    $barcode = barcodedecode($barcode) if(C4::Context->preference('itemBarcodeInputFilter'));
120
119
121
    ######################
120
    ######################
122
    #Are these lines still useful ?
121
    #Are these lines still useful ?
Lines 243-250 if ($canceltransfer){ Link Here
243
my $returnbranch;
242
my $returnbranch;
244
if ($barcode) {
243
if ($barcode) {
245
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
244
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
246
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
245
    $barcode = barcodedecode($barcode) if $barcode;
247
    $barcode = barcodedecode($barcode) if C4::Context->preference('itemBarcodeInputFilter');
248
    my $item = Koha::Items->find({ barcode => $barcode });
246
    my $item = Koha::Items->find({ barcode => $barcode });
249
247
250
    if ( $item ) {
248
    if ( $item ) {
(-)a/offline_circ/process_koc.pl (-7 / +2 lines)
Lines 246-255 sub arguments_for_command { Link Here
246
sub kocIssueItem {
246
sub kocIssueItem {
247
    my $circ = shift;
247
    my $circ = shift;
248
248
249
    $circ->{ 'barcode' } = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter'));
249
    $circ->{barcode} = barcodedecode( $circ->{barcode} ) if $circ->{barcode};
250
251
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $circ->{barcode} ) || $circ->{barcode};
252
    $circ->{barcode} = $new_barcode;
253
250
254
    my $branchcode = C4::Context->userenv->{branch};
251
    my $branchcode = C4::Context->userenv->{branch};
255
    my $patron = Koha::Patrons->find( { cardnumber => $circ->{cardnumber} } );
252
    my $patron = Koha::Patrons->find( { cardnumber => $circ->{cardnumber} } );
Lines 330-339 sub kocIssueItem { Link Here
330
327
331
sub kocReturnItem {
328
sub kocReturnItem {
332
    my ( $circ ) = @_;
329
    my ( $circ ) = @_;
333
    $circ->{'barcode'} = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter'));
334
330
335
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $circ->{barcode} ) || $circ->{barcode};
331
    $circ->{barcode} = barcodedecode( $circ->{barcode} ) if $circ->{barcode};
336
    $circ->{barcode} = $new_barcode;
337
332
338
    my $item = Koha::Items->find({ barcode => $circ->{barcode} });
333
    my $item = Koha::Items->find({ barcode => $circ->{barcode} });
339
    my $biblio = $item->biblio;
334
    my $biblio = $item->biblio;
(-)a/opac/sco/sco-main.pl (-1 / +1 lines)
Lines 110-116 my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed, $newissues) = Link Here
110
    $query->param("newissues")  || '',
110
    $query->param("newissues")  || '',
111
);
111
);
112
112
113
( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
113
$barcode = barcodedecode( $barcode ) if $barcode;
114
114
115
my @newissueslist = split /,/, $newissues;
115
my @newissueslist = split /,/, $newissues;
116
my $issuenoconfirm = 1; #don't need to confirm on issue.
116
my $issuenoconfirm = 1; #don't need to confirm on issue.
(-)a/tools/batchMod.pl (-1 / +1 lines)
Lines 404-410 if ($op eq "show"){ Link Here
404
            my @barcodelist = grep /\S/, ( split /[$split_chars]/, $list );
404
            my @barcodelist = grep /\S/, ( split /[$split_chars]/, $list );
405
            @barcodelist = uniq @barcodelist;
405
            @barcodelist = uniq @barcodelist;
406
406
407
            @barcodelist = map { ( Koha::Plugins->call( 'item_barcode_transform', $_ ) )[0] || $_ } @barcodelist;
407
            @barcodelist = map { barcodedecode( $_ ) } @barcodelist;
408
408
409
            # Note: adding lc for case insensitivity
409
            # Note: adding lc for case insensitivity
410
            my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => \@barcodelist }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed };
410
            my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => \@barcodelist }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed };
(-)a/tools/inventory.pl (-2 / +1 lines)
Lines 191-197 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
191
    for my $barcode (@uploadedbarcodes) {
191
    for my $barcode (@uploadedbarcodes) {
192
        next unless $barcode;
192
        next unless $barcode;
193
193
194
        ($barcode) = Koha::Plugins->call('item_barcode_transform', $barcode ) || $barcode;
194
        $barcode = barcodedecode($barcode);
195
195
196
        ++$lines_read;
196
        ++$lines_read;
197
        if (length($barcode)>$barcode_size) {
197
        if (length($barcode)>$barcode_size) {
198
- 

Return to bug 26351