Bug 22392: Allow barcode to be passed to build_sample_item
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
417e132253
commit
3189df3ac9
|
|
@ -175,11 +175,16 @@ sub build_sample_item {
|
|||
my $itype = delete $args->{itype}
|
||||
|| $self->build_object( { class => 'Koha::ItemTypes' } )->itemtype;
|
||||
|
||||
my $barcode =
|
||||
exists( $args->{barcode} )
|
||||
? $args->{barcode}
|
||||
: $self->_gen_text( { info => { size => SIZE_BARCODE } } );
|
||||
|
||||
my ( undef, undef, $itemnumber ) = C4::Items::AddItem(
|
||||
{
|
||||
homebranch => $library,
|
||||
holdingbranch => $library,
|
||||
barcode => $self->_gen_text( { info => { size => SIZE_BARCODE } } ),
|
||||
barcode => $barcode,
|
||||
itype => $itype,
|
||||
%$args,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue