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

(-)a/C4/ILSDI/Services.pm (-2 / +1 lines)
Lines 643-650 sub GetServices { Link Here
643
643
644
    # Issuing management
644
    # Issuing management
645
    my $barcode = $item->barcode || '';
645
    my $barcode = $item->barcode || '';
646
    $barcode = barcodedecode($barcode) if ( $barcode && C4::Context->preference('itemBarcodeInputFilter') );
646
    $barcode = barcodedecode($barcode) if $barcode;
647
    ($barcode) = Koha::Plugins->call('item_barcode_transform', $barcode ) || $barcode;
648
    if ($barcode) {
647
    if ($barcode) {
649
        my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $barcode );
648
        my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $barcode );
650
649
(-)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 $action = 'create';
95
    my $action = 'create';
(-)a/cataloguing/additem.pl (-2 / +1 lines)
Lines 520-527 if ($op eq "additem") { Link Here
520
520
521
    my $addedolditem = TransformMarcToKoha( $record );
521
    my $addedolditem = TransformMarcToKoha( $record );
522
522
523
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $addedolditem->{'barcode'} ) || $addedolditem->{'barcode'};
523
    $addedolditem->{barcode} = barcodedecode( $addedolditem->{barcode} );
524
    $addedolditem->{'barcode'} = $new_barcode;
525
524
526
    # If we have to add or add & duplicate, we add the item
525
    # If we have to add or add & duplicate, we add the item
527
    if ( $add_submit || $add_duplicate_submit ) {
526
    if ( $add_submit || $add_duplicate_submit ) {
(-)a/circ/circulation.pl (-3 / +1 lines)
Lines 158-166 if (C4::Context->preference("DisplayClearScreenButton")) { Link Here
158
158
159
for my $barcode ( @$barcodes ) {
159
for my $barcode ( @$barcodes ) {
160
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
160
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
161
    $barcode = barcodedecode($barcode)
161
    $barcode = barcodedecode( $barcode ) if $barcode;
162
        if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
163
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
164
}
162
}
165
163
166
my $stickyduedate  = $query->param('stickyduedate') || $session->param('stickyduedate');
164
my $stickyduedate  = $query->param('stickyduedate') || $session->param('stickyduedate');
(-)a/circ/returns.pl (-4 / +2 lines)
Lines 114-121 foreach ( $query->param ) { Link Here
114
114
115
    # decode barcode    ## Didn't we already decode them before passing them back last time??
115
    # decode barcode    ## Didn't we already decode them before passing them back last time??
116
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
116
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
117
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
117
    $barcode = barcodedecode($barcode) if $barcode;
118
    $barcode = barcodedecode($barcode) if(C4::Context->preference('itemBarcodeInputFilter'));
119
118
120
    ######################
119
    ######################
121
    #Are these lines still useful ?
120
    #Are these lines still useful ?
Lines 249-256 if ($transit) { Link Here
249
my $returnbranch;
248
my $returnbranch;
250
if ($barcode) {
249
if ($barcode) {
251
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
250
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
252
    ( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
251
    $barcode = barcodedecode($barcode) if $barcode;
253
    $barcode = barcodedecode($barcode) if C4::Context->preference('itemBarcodeInputFilter');
254
    my $item = Koha::Items->find({ barcode => $barcode });
252
    my $item = Koha::Items->find({ barcode => $barcode });
255
253
256
    if ( $item ) {
254
    if ( $item ) {
(-)a/offline_circ/process_koc.pl (-7 / +2 lines)
Lines 243-252 sub arguments_for_command { Link Here
243
sub kocIssueItem {
243
sub kocIssueItem {
244
    my $circ = shift;
244
    my $circ = shift;
245
245
246
    $circ->{ 'barcode' } = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter'));
246
    $circ->{barcode} = barcodedecode( $circ->{barcode} ) if $circ->{barcode};
247
248
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $circ->{barcode} ) || $circ->{barcode};
249
    $circ->{barcode} = $new_barcode;
250
247
251
    my $branchcode = C4::Context->userenv->{branch};
248
    my $branchcode = C4::Context->userenv->{branch};
252
    my $patron = Koha::Patrons->find( { cardnumber => $circ->{cardnumber} } );
249
    my $patron = Koha::Patrons->find( { cardnumber => $circ->{cardnumber} } );
Lines 327-336 sub kocIssueItem { Link Here
327
324
328
sub kocReturnItem {
325
sub kocReturnItem {
329
    my ( $circ ) = @_;
326
    my ( $circ ) = @_;
330
    $circ->{'barcode'} = barcodedecode($circ->{'barcode'}) if( $circ->{'barcode'} && C4::Context->preference('itemBarcodeInputFilter'));
331
327
332
    my ( $new_barcode ) = Koha::Plugins->call( 'item_barcode_transform', $circ->{barcode} ) || $circ->{barcode};
328
    $circ->{barcode} = barcodedecode( $circ->{barcode} ) if $circ->{barcode};
333
    $circ->{barcode} = $new_barcode;
334
329
335
    my $item = Koha::Items->find({ barcode => $circ->{barcode} });
330
    my $item = Koha::Items->find({ barcode => $circ->{barcode} });
336
    my $biblio = $item->biblio;
331
    my $biblio = $item->biblio;
(-)a/opac/sco/sco-main.pl (-1 / +1 lines)
Lines 106-112 my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed, $newissues) = Link Here
106
    $query->param("newissues")  || '',
106
    $query->param("newissues")  || '',
107
);
107
);
108
108
109
( $barcode ) = Koha::Plugins->call( 'item_barcode_transform', $barcode ) || $barcode;
109
$barcode = barcodedecode( $barcode ) if $barcode;
110
110
111
my @newissueslist = split /,/, $newissues;
111
my @newissueslist = split /,/, $newissues;
112
my $issuenoconfirm = 1; #don't need to confirm on issue.
112
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 189-195 if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length Link Here
189
    for my $barcode (@uploadedbarcodes) {
189
    for my $barcode (@uploadedbarcodes) {
190
        next unless $barcode;
190
        next unless $barcode;
191
191
192
        ($barcode) = Koha::Plugins->call('item_barcode_transform', $barcode ) || $barcode;
192
        $barcode = barcodedecode($barcode);
193
193
194
        ++$lines_read;
194
        ++$lines_read;
195
        if (length($barcode)>$barcode_size) {
195
        if (length($barcode)>$barcode_size) {
196
- 

Return to bug 26351