Lines 220-233
sub AddItemFromMarc {
Link Here
|
220 |
my $dbh = C4::Context->dbh; |
220 |
my $dbh = C4::Context->dbh; |
221 |
|
221 |
|
222 |
# parse item hash from MARC |
222 |
# parse item hash from MARC |
223 |
my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblionumber ); |
223 |
my $frameworkcode = C4::Biblio::GetFrameworkCode($biblionumber); |
224 |
my ($itemtag,$itemsubfield)=C4::Biblio::GetMarcFromKohaField("items.itemnumber",$frameworkcode); |
224 |
my ( $itemtag, $itemsubfield ) = C4::Biblio::GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); |
225 |
|
225 |
|
226 |
my $localitemmarc=MARC::Record->new; |
226 |
my $localitemmarc = MARC::Record->new; |
227 |
$localitemmarc->append_fields($source_item_marc->field($itemtag)); |
227 |
$localitemmarc->append_fields( $source_item_marc->field($itemtag) ); |
228 |
my $item = C4::Biblio::TransformMarcToKoha( $localitemmarc, $frameworkcode ,'items'); |
228 |
my $item = C4::Biblio::TransformMarcToKoha( $localitemmarc, $frameworkcode, 'items' ); |
229 |
my $unlinked_item_subfields = _get_unlinked_item_subfields($localitemmarc, $frameworkcode); |
229 |
my $unlinked_item_subfields = _get_unlinked_item_subfields( $localitemmarc, $frameworkcode ); |
230 |
return AddItem($item, $biblionumber, $dbh, $frameworkcode, $unlinked_item_subfields); |
230 |
return AddItem( $item, $biblionumber, $dbh, $frameworkcode, $unlinked_item_subfields ); |
231 |
} |
231 |
} |
232 |
|
232 |
|
233 |
=head2 AddItem |
233 |
=head2 AddItem |
234 |
- |
|
|