Lines 19-24
use Modern::Perl;
Link Here
|
19 |
|
19 |
|
20 |
use Mojo::Base 'Mojolicious::Controller'; |
20 |
use Mojo::Base 'Mojolicious::Controller'; |
21 |
|
21 |
|
|
|
22 |
use C4::Circulation qw( barcodedecode ); |
23 |
|
22 |
use Koha::Items; |
24 |
use Koha::Items; |
23 |
|
25 |
|
24 |
use List::MoreUtils qw( any ); |
26 |
use List::MoreUtils qw( any ); |
Lines 199-206
sub add_to_bundle {
Link Here
|
199 |
); |
201 |
); |
200 |
} |
202 |
} |
201 |
|
203 |
|
202 |
|
|
|
203 |
my $bundle_item_id = $c->validation->param('body')->{'external_id'}; |
204 |
my $bundle_item_id = $c->validation->param('body')->{'external_id'}; |
|
|
205 |
$bundle_item_id = barcodedecode($bundle_item_id); |
204 |
my $bundle_item = Koha::Items->find( { barcode => $bundle_item_id } ); |
206 |
my $bundle_item = Koha::Items->find( { barcode => $bundle_item_id } ); |
205 |
|
207 |
|
206 |
unless ($bundle_item) { |
208 |
unless ($bundle_item) { |
Lines 253-258
sub remove_from_bundle {
Link Here
|
253 |
} |
255 |
} |
254 |
|
256 |
|
255 |
my $bundle_item_id = $c->validation->param('bundled_item_id'); |
257 |
my $bundle_item_id = $c->validation->param('bundled_item_id'); |
|
|
258 |
$bundle_item_id = barcodedecode($bundle_item_id); |
256 |
my $bundle_item = Koha::Items->find( { itemnumber => $bundle_item_id } ); |
259 |
my $bundle_item = Koha::Items->find( { itemnumber => $bundle_item_id } ); |
257 |
|
260 |
|
258 |
unless ($bundle_item) { |
261 |
unless ($bundle_item) { |
259 |
- |
|
|