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

(-)a/C4/ILSDI/Services.pm (-2 / +1 lines)
Lines 627-634 sub GetServices { Link Here
627
627
628
    # Issuing management
628
    # Issuing management
629
    my $barcode = $item->barcode || '';
629
    my $barcode = $item->barcode || '';
630
    $barcode = barcodedecode($barcode) if ( $barcode && C4::Context->preference('itemBarcodeInputFilter') );
630
    $barcode = barcodedecode($barcode) if $barcode;
631
    ($barcode) = Koha::Plugins->call('item_barcode_transform', $barcode ) || $barcode;
632
    if ($barcode) {
631
    if ($barcode) {
633
        my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $barcode );
632
        my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $barcode );
634
633
(-)a/Koha/Item.pm (-2 / +1 lines)
Lines 89-96 sub store { Link Here
89
        $self->itype($self->biblio->biblioitem->itemtype);
89
        $self->itype($self->biblio->biblioitem->itemtype);
90
    }
90
    }
91
91
92
    my ($transformed_barcode) = Koha::Plugins->call( 'item_barcode_transform', $self->barcode ) || $self->barcode;
92
    $self->barcode( barcodedecode( $self->barcode ) );
93
    $self->barcode($transformed_barcode);
94
93
95
    my $today         = dt_from_string;
94
    my $today         = dt_from_string;
96
    my $plugin_action = 'create';
95
    my $plugin_action = 'create';
(-)a/cataloguing/additem.pl (-2 / +1 lines)
Lines 517-524 if ($op eq "additem") { Link Here
517
517
518
    my $addedolditem = TransformMarcToKoha( $record );
518
    my $addedolditem = TransformMarcToKoha( $record );
519
519
520
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $addedolditem->{'barcode'} ) || $addedolditem->{'barcode'};
520
    $addedolditem->{barcode} = barcodedecode( $addedolditem->{barcode} );
521
    $addedolditem->{'barcode'} = $new_barcode;
522
521
523
    # If we have to add or add & duplicate, we add the item
522
    # If we have to add or add & duplicate, we add the item
524
    if ( $add_submit || $add_duplicate_submit ) {
523
    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 245-252 if ($canceltransfer){ Link Here
245
my $returnbranch;
244
my $returnbranch;
246
if ($barcode) {
245
if ($barcode) {
247
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
246
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
248
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
247
    $barcode = barcodedecode($barcode) if $barcode;
249
    $barcode = barcodedecode($barcode) if C4::Context->preference('itemBarcodeInputFilter');
250
    my $item = Koha::Items->find({ barcode => $barcode });
248
    my $item = Koha::Items->find({ barcode => $barcode });
251
249
252
    if ( $item ) {
250
    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 183-189 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
183
    for my $barcode (@uploadedbarcodes) {
183
    for my $barcode (@uploadedbarcodes) {
184
        next unless $barcode;
184
        next unless $barcode;
185
185
186
        ($barcode) = Koha::Plugins->call('item_barcode_transform', $barcode ) || $barcode;
186
        $barcode = barcodedecode($barcode);
187
187
188
        ++$lines_read;
188
        ++$lines_read;
189
        if (length($barcode)>$barcode_size) {
189
        if (length($barcode)>$barcode_size) {
190
- 

Return to bug 26351