Lines 1021-1026
subtest 'tests for GetMarcItem' => sub {
Link Here
|
1021 |
restricted => 1, |
1021 |
restricted => 1, |
1022 |
itemcallnumber => "", |
1022 |
itemcallnumber => "", |
1023 |
cn_sort => "", |
1023 |
cn_sort => "", |
|
|
1024 |
itype => 'itemtype' |
1024 |
} |
1025 |
} |
1025 |
}); |
1026 |
}); |
1026 |
my $get_itemnumber = $item1->itemnumber; |
1027 |
my $get_itemnumber = $item1->itemnumber; |
Lines 1067-1073
subtest 'tests for GetMarcItemFields' => sub {
Link Here
|
1067 |
withdrawn => 0, |
1068 |
withdrawn => 0, |
1068 |
} |
1069 |
} |
1069 |
}); |
1070 |
}); |
1070 |
push @items, GetItem( $item1->itemnumber ); |
1071 |
push @items, Koha::Items->find( $item1->itemnumber )->unblessed; |
1071 |
my $item2 = $builder->build_object({ |
1072 |
my $item2 = $builder->build_object({ |
1072 |
class => 'Koha::Items', |
1073 |
class => 'Koha::Items', |
1073 |
value => { |
1074 |
value => { |
Lines 1082-1088
subtest 'tests for GetMarcItemFields' => sub {
Link Here
|
1082 |
withdrawn => 0, |
1083 |
withdrawn => 0, |
1083 |
} |
1084 |
} |
1084 |
}); |
1085 |
}); |
1085 |
push @items, GetItem( $item2->itemnumber ); |
1086 |
push @items, Koha::Items->find( $item2->itemnumber )->unblessed; |
1086 |
my $item3 = $builder->build_object({ |
1087 |
my $item3 = $builder->build_object({ |
1087 |
class => 'Koha::Items', |
1088 |
class => 'Koha::Items', |
1088 |
value => { |
1089 |
value => { |
Lines 1097-1109
subtest 'tests for GetMarcItemFields' => sub {
Link Here
|
1097 |
withdrawn => 1, |
1098 |
withdrawn => 1, |
1098 |
} |
1099 |
} |
1099 |
}); |
1100 |
}); |
1100 |
push @items, GetItem( $item3->itemnumber ); |
1101 |
push @items, Koha::Items->find( $item3->itemnumber )->unblessed; |
1101 |
|
1102 |
|
1102 |
#Get the marc for our items individually for comparison later |
1103 |
#Get the marc for our items individually for comparison later |
1103 |
my $item1_marc = C4::Items::GetMarcItem( $biblio->{biblionumber}, $item1->itemnumber ); |
1104 |
my $item1_marc = C4::Items::GetMarcItem( $biblio->{biblionumber}, $item1->itemnumber ); |
1104 |
my $item2_marc = C4::Items::GetMarcItem( $biblio->{biblionumber}, $item2->itemnumber ); |
1105 |
my $item2_marc = C4::Items::GetMarcItem( $biblio->{biblionumber}, $item2->itemnumber ); |
1105 |
my $item3_marc = C4::Items::GetMarcItem( $biblio->{biblionumber}, $item3->itemnumber ); |
1106 |
my $item3_marc = C4::Items::GetMarcItem( $biblio->{biblionumber}, $item3->itemnumber ); |
1106 |
my ($itemtag, $item_num_subfield )=C4::Biblio::GetMarcFromKohaField("items.itemnumber"); #get itemnumber tag |
1107 |
my ($itemtag, $item_num_subfield ) = C4::Biblio::GetMarcFromKohaField("items.itemnumber"); #get itemnumber tag |
1107 |
$item1_marc->field($itemtag)->delete_subfield(code => $item_num_subfield); #and remove it |
1108 |
$item1_marc->field($itemtag)->delete_subfield(code => $item_num_subfield); #and remove it |
1108 |
$item2_marc->field($itemtag)->delete_subfield(code => $item_num_subfield); #because it won't match |
1109 |
$item2_marc->field($itemtag)->delete_subfield(code => $item_num_subfield); #because it won't match |
1109 |
|
1110 |
|
1110 |
- |
|
|