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

(-)a/Koha/MarcOrder.pm (-1 / +3 lines)
Lines 958-964 sub create_items_and_generate_order_hash { Link Here
958
    my $itemcreation    = 0;
958
    my $itemcreation    = 0;
959
    my @itemnumbers;
959
    my @itemnumbers;
960
960
961
    if ( C4::Context->preference('AcqCreateItem') ne 'cataloguing' ) {
961
    # We directly create the items if MarcItemFieldsToOrder is populated (item fields have values)
962
    if ( C4::Context->preference('AcqCreateItem') ne 'cataloguing' && @{ $fields->{homebranch} } ) {
962
        for ( my $i = 0 ; $i < $loop_limit ; $i++ ) {
963
        for ( my $i = 0 ; $i < $loop_limit ; $i++ ) {
963
            $itemcreation = 1;
964
            $itemcreation = 1;
964
            my $item = Koha::Item->new(
965
            my $item = Koha::Item->new(
Lines 1052-1057 sub create_items_and_generate_order_hash { Link Here
1052
        }
1053
        }
1053
    } else {
1054
    } else {
1054
1055
1056
        # Here we are using the 'MARC' for items from the 'Item information' tab for creating the items
1055
        # Add an orderline for each MARC record
1057
        # Add an orderline for each MARC record
1056
        # Get quantity in the MARC record (1 if none)
1058
        # Get quantity in the MARC record (1 if none)
1057
        my $quantity  = GetMarcQuantity( $fields->{marcrecord}, C4::Context->preference('marcflavour') ) || 1;
1059
        my $quantity  = GetMarcQuantity( $fields->{marcrecord}, C4::Context->preference('marcflavour') ) || 1;
(-)a/t/db_dependent/Koha/MarcOrder.t (-1 / +1 lines)
Lines 443-448 subtest 'add_items_from_import_record() - addorderiso2709.pl' => sub { Link Here
443
443
444
    subtest "Using MarcFieldsToOrder only" => sub {
444
    subtest "Using MarcFieldsToOrder only" => sub {
445
        plan tests => 9;
445
        plan tests => 9;
446
        t::lib::Mocks::mock_userenv( { branchcode => $branchcode } );
446
447
447
        my $client_item_fields = {
448
        my $client_item_fields = {
448
            'tags' => [
449
            'tags' => [
449
- 

Return to bug 39282