Lines 129-134
use C4::Biblio; # AddBiblio TransformKohaToMarc
Link Here
|
129 |
use C4::Budgets; |
129 |
use C4::Budgets; |
130 |
use C4::Items; |
130 |
use C4::Items; |
131 |
use C4::Output; |
131 |
use C4::Output; |
|
|
132 |
use C4::Koha qw( subfield_is_koha_internal_p ); |
133 |
use MARC::Field; |
132 |
|
134 |
|
133 |
### "-------------------- addorder.pl ----------" |
135 |
### "-------------------- addorder.pl ----------" |
134 |
|
136 |
|
Lines 259-264
if ( $orderinfo->{quantity} ne '0' ) {
Link Here
|
259 |
"aqorders.discount" => $$orderinfo{discount} ? $$orderinfo{discount} : "", |
261 |
"aqorders.discount" => $$orderinfo{discount} ? $$orderinfo{discount} : "", |
260 |
}); |
262 |
}); |
261 |
|
263 |
|
|
|
264 |
|
265 |
my $tagslib = C4::Biblio::GetMarcStructure( 1, 'ACQ' ); |
266 |
if ( $tagslib ) { |
267 |
my ( $itemfield ) = C4::Biblio::GetMarcFromKohaField( 'items.itemnumber', '' ); |
268 |
for my $tag ( sort keys %$tagslib ) { |
269 |
next unless $tag; |
270 |
next if $tag == $itemfield; |
271 |
for my $subfield ( sort keys %{ $tagslib->{$tag} } ) { |
272 |
next if ( subfield_is_koha_internal_p($subfield) ); |
273 |
my $defaultvalue = $tagslib->{$tag}{$subfield}{defaultvalue}; |
274 |
if ( defined $defaultvalue and $defaultvalue ne '' ) { |
275 |
$record->insert_fields_ordered( |
276 |
MARC::Field->new( $tag, '', '', $subfield => $defaultvalue ) |
277 |
); |
278 |
} |
279 |
} |
280 |
} |
281 |
} |
282 |
|
262 |
# create the record in catalogue, with framework '' |
283 |
# create the record in catalogue, with framework '' |
263 |
my ($biblionumber,$bibitemnum) = AddBiblio($record,''); |
284 |
my ($biblionumber,$bibitemnum) = AddBiblio($record,''); |
264 |
# change suggestion status if applicable |
285 |
# change suggestion status if applicable |
265 |
- |
|
|