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 509-516 if ($op eq "additem") { Link Here
509
509
510
    my $addedolditem = TransformMarcToKoha( $record );
510
    my $addedolditem = TransformMarcToKoha( $record );
511
511
512
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $addedolditem->{'barcode'} ) || $addedolditem->{'barcode'};
512
    $addedolditem->{barcode} = barcodedecode( $addedolditem->{barcode} );
513
    $addedolditem->{'barcode'} = $new_barcode;
514
513
515
    # If we have to add or add & duplicate, we add the item
514
    # If we have to add or add & duplicate, we add the item
516
    if ( $add_submit || $add_duplicate_submit ) {
515
    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 116-123 foreach ( $query->param ) { Link Here
116
116
117
    # decode barcode    ## Didn't we already decode them before passing them back last time??
117
    # decode barcode    ## Didn't we already decode them before passing them back last time??
118
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
118
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
119
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
119
    $barcode = barcodedecode($barcode) if $barcode;
120
    $barcode = barcodedecode($barcode) if(C4::Context->preference('itemBarcodeInputFilter'));
121
120
122
    ######################
121
    ######################
123
    #Are these lines still useful ?
122
    #Are these lines still useful ?
Lines 251-258 if ($transit) { Link Here
251
my $returnbranch;
250
my $returnbranch;
252
if ($barcode) {
251
if ($barcode) {
253
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
252
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
254
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
253
    $barcode = barcodedecode($barcode) if $barcode;
255
    $barcode = barcodedecode($barcode) if C4::Context->preference('itemBarcodeInputFilter');
256
    my $item = Koha::Items->find({ barcode => $barcode });
254
    my $item = Koha::Items->find({ barcode => $barcode });
257
255
258
    if ( $item ) {
256
    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 109-115 my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed, $newissues) = Link Here
109
    $query->param("newissues")  || '',
109
    $query->param("newissues")  || '',
110
);
110
);
111
111
112
( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
112
$barcode = barcodedecode( $barcode ) if $barcode;
113
113
114
my @newissueslist = split /,/, $newissues;
114
my @newissueslist = split /,/, $newissues;
115
my $issuenoconfirm = 1; #don't need to confirm on issue.
115
my $issuenoconfirm = 1; #don't need to confirm on issue.
(-)a/tools/batchMod.pl (-1 / +1 lines)
Lines 374-380 if ($op eq "show"){ Link Here
374
            my @barcodelist = grep /\S/, ( split /[$split_chars]/, $list );
374
            my @barcodelist = grep /\S/, ( split /[$split_chars]/, $list );
375
            @barcodelist = uniq @barcodelist;
375
            @barcodelist = uniq @barcodelist;
376
376
377
            @barcodelist = map { ( Koha::Plugins->call( 'item_barcode_transform', $_ ) )[0] || $_ } @barcodelist;
377
            @barcodelist = map { barcodedecode( $_ ) } @barcodelist;
378
378
379
            # Note: adding lc for case insensitivity
379
            # Note: adding lc for case insensitivity
380
            my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => \@barcodelist }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed };
380
            my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => \@barcodelist }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed };
(-)a/tools/inventory.pl (-2 / +1 lines)
Lines 190-196 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
190
    for my $barcode (@uploadedbarcodes) {
190
    for my $barcode (@uploadedbarcodes) {
191
        next unless $barcode;
191
        next unless $barcode;
192
192
193
        ($barcode) = Koha::Plugins->call('item_barcode_transform', $barcode ) || $barcode;
193
        $barcode = barcodedecode($barcode);
194
194
195
        ++$lines_read;
195
        ++$lines_read;
196
        if (length($barcode)>$barcode_size) {
196
        if (length($barcode)>$barcode_size) {
197
- 

Return to bug 26351