Lines 205-211
sub can_add_item_from_marc_record {
Link Here
|
205 |
# Check that holdingbranch is set |
205 |
# Check that holdingbranch is set |
206 |
my $holdingbranch_mss = Koha::MarcSubfieldStructures->find( |
206 |
my $holdingbranch_mss = Koha::MarcSubfieldStructures->find( |
207 |
{ |
207 |
{ |
208 |
kohafield => 'items.holdingbranch', |
208 |
frameworkcode => '', |
|
|
209 |
kohafield => 'items.holdingbranch', |
209 |
} |
210 |
} |
210 |
); |
211 |
); |
211 |
my @holdingbranch_exists = |
212 |
my @holdingbranch_exists = |
Lines 215-221
sub can_add_item_from_marc_record {
Link Here
|
215 |
# Check that homebranch is set |
216 |
# Check that homebranch is set |
216 |
my $homebranch_mss = Koha::MarcSubfieldStructures->find( |
217 |
my $homebranch_mss = Koha::MarcSubfieldStructures->find( |
217 |
{ |
218 |
{ |
218 |
kohafield => 'items.homebranch', |
219 |
frameworkcode => '', |
|
|
220 |
kohafield => 'items.homebranch', |
219 |
} |
221 |
} |
220 |
); |
222 |
); |
221 |
my @homebranch_exists = |
223 |
my @homebranch_exists = |
Lines 225-231
sub can_add_item_from_marc_record {
Link Here
|
225 |
# Check that itemtype is set |
227 |
# Check that itemtype is set |
226 |
my $item_mss = Koha::MarcSubfieldStructures->find( |
228 |
my $item_mss = Koha::MarcSubfieldStructures->find( |
227 |
{ |
229 |
{ |
228 |
kohafield => C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype', |
230 |
frameworkcode => '', |
|
|
231 |
kohafield => C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype', |
229 |
} |
232 |
} |
230 |
); |
233 |
); |
231 |
my @itemtype_exists = grep { $_->subfield( $item_mss->tagsubfield ) } $record->field( $item_mss->tagfield ); |
234 |
my @itemtype_exists = grep { $_->subfield( $item_mss->tagsubfield ) } $record->field( $item_mss->tagfield ); |
232 |
- |
|
|