Lines 359-376
sub redirect_add_subscription {
Link Here
|
359 |
$template->param( mana_msg => $result->{msg} ); |
359 |
$template->param( mana_msg => $result->{msg} ); |
360 |
} |
360 |
} |
361 |
|
361 |
|
362 |
my @additional_fields; |
362 |
my @additional_fields = Koha::Subscriptions->find($subscriptionid) |
363 |
my $biblio = Koha::Biblios->find($biblionumber); |
363 |
->prepare_cgi_additional_field_values( $query, 'subscription' ); |
364 |
my $subscription_fields = Koha::AdditionalFields->search({ tablename => 'subscription' }); |
|
|
365 |
while ( my $field = $subscription_fields->next ) { |
366 |
my @field_values = $query->param( 'additional_field_' . $field->id ); |
367 |
foreach my $value (@field_values) { |
368 |
push @additional_fields, { |
369 |
id => $field->id, |
370 |
value => $value, |
371 |
} if $value; |
372 |
} |
373 |
} |
374 |
Koha::Subscriptions->find($subscriptionid)->set_additional_fields(\@additional_fields); |
364 |
Koha::Subscriptions->find($subscriptionid)->set_additional_fields(\@additional_fields); |
375 |
|
365 |
|
376 |
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); |
366 |
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); |
Lines 475-492
sub redirect_mod_subscription {
Link Here
|
475 |
$skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template |
465 |
$skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template |
476 |
); |
466 |
); |
477 |
|
467 |
|
478 |
my @additional_fields; |
468 |
my @additional_fields = |
479 |
my $biblio = Koha::Biblios->find($biblionumber); |
469 |
Koha::Subscriptions->find($subscriptionid)->prepare_cgi_additional_field_values( $query, 'subscription' ); |
480 |
my $subscription_fields = Koha::AdditionalFields->search({ tablename => 'subscription' }); |
|
|
481 |
while ( my $field = $subscription_fields->next ) { |
482 |
my @field_values = $query->param( 'additional_field_' . $field->id ); |
483 |
foreach my $value (@field_values) { |
484 |
push @additional_fields, { |
485 |
id => $field->id, |
486 |
value => $value, |
487 |
} if $value; |
488 |
} |
489 |
} |
490 |
Koha::Subscriptions->find($subscriptionid)->set_additional_fields(\@additional_fields); |
470 |
Koha::Subscriptions->find($subscriptionid)->set_additional_fields(\@additional_fields); |
491 |
|
471 |
|
492 |
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); |
472 |
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); |