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>
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,
},