View | Details | Raw Unified | Return to bug 37247
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc (-3 / +3 lines)
Lines 49-62 Link Here
49
        [% END %]
49
        [% END %]
50
50
51
        [% IF not cannotedit or CAN_user_serials_receive_serials %]
51
        [% IF not cannotedit or CAN_user_serials_receive_serials %]
52
            [% IF CAN_user_serials_renew_subscription and not closed %]
52
            [% IF CAN_user_serials_renew_subscription and not subscription.closed %]
53
                <div class="btn-group"><a id="renew" class="btn btn-default" href="#"><i class="fa-solid fa-rotate"></i> Renew</a></div>
53
                <div class="btn-group"><a id="renew" class="btn btn-default" href="#"><i class="fa-solid fa-rotate"></i> Renew</a></div>
54
            [% END %]
54
            [% END %]
55
            [% IF CAN_user_serials_receive_serials and not closed %]
55
            [% IF CAN_user_serials_receive_serials and not subscription.closed %]
56
                <div class="btn-group"><a id="receive" class="btn btn-default" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid | html %]&amp;serstatus=1,3"><i class="fa fa-inbox"></i> Receive</a></div>
56
                <div class="btn-group"><a id="receive" class="btn btn-default" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid | html %]&amp;serstatus=1,3"><i class="fa fa-inbox"></i> Receive</a></div>
57
            [% END %]
57
            [% END %]
58
            [% UNLESS cannotedit %]
58
            [% UNLESS cannotedit %]
59
                [% IF closed %]
59
                [% IF subscription.closed %]
60
                    <div class="btn-group"><a id="reopen" class="btn btn-default" href="#"><i class="fa-solid fa-arrow-rotate-right"></i> Reopen</a></div>
60
                    <div class="btn-group"><a id="reopen" class="btn btn-default" href="#"><i class="fa-solid fa-arrow-rotate-right"></i> Reopen</a></div>
61
                [% ELSE %]
61
                [% ELSE %]
62
                    <div class="btn-group"><a id="close" class="btn btn-default" href="#"><i class="fa fa-times-circle"></i> Close</a></div>
62
                    <div class="btn-group"><a id="close" class="btn btn-default" href="#"><i class="fa fa-times-circle"></i> Close</a></div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (-2 / +2 lines)
Lines 44-53 Link Here
44
                [% INCLUDE 'serials-toolbar.inc' %]
44
                [% INCLUDE 'serials-toolbar.inc' %]
45
                [% INCLUDE 'mana/mana-comment-status.inc' %]
45
                [% INCLUDE 'mana/mana-comment-status.inc' %]
46
46
47
                <h1>Subscription for [% INCLUDE 'biblio-title.inc' biblio=subscription.biblio link = 0 %] [% IF closed %](closed)[% END %]</h1>
47
                <h1>Subscription for [% INCLUDE 'biblio-title.inc' biblio=subscription.biblio link = 0 %] [% IF subscription.closed %](closed)[% END %]</h1>
48
48
49
                [% IF ( abouttoexpire ) %]
49
                [% IF ( abouttoexpire ) %]
50
                    [% UNLESS closed %]
50
                    [% UNLESS subscription.closed %]
51
                        <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
51
                        <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
52
                    [% END %]
52
                    [% END %]
53
                [% END %]
53
                [% END %]
(-)a/serials/subscription-detail.pl (-3 / +2 lines)
Lines 62-69 $subs->{enddate} ||= GetExpirationDate($subscriptionid); Link Here
62
my ($totalissues,@serialslist) = GetSerials($subscriptionid);
62
my ($totalissues,@serialslist) = GetSerials($subscriptionid);
63
$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
63
$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
64
64
65
my $subscription = Koha::Subscriptions->find( $subscriptionid );
66
67
if ( $op and $op eq "close" ) {
65
if ( $op and $op eq "close" ) {
68
    C4::Serials::CloseSubscription( $subscriptionid );
66
    C4::Serials::CloseSubscription( $subscriptionid );
69
} elsif ( $op and $op eq "reopen" ) {
67
} elsif ( $op and $op eq "reopen" ) {
Lines 123-128 my @irregular_issues = split /;/, $subs->{irregularity}; Link Here
123
my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subs->{periodicity});
121
my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subs->{periodicity});
124
my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subs->{numberpattern});
122
my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subs->{numberpattern});
125
123
124
my $subscription = Koha::Subscriptions->find( $subscriptionid );
125
126
$template->param(
126
$template->param(
127
    available_additional_fields => Koha::AdditionalFields->search( { tablename => 'subscription' } ),
127
    available_additional_fields => Koha::AdditionalFields->search( { tablename => 'subscription' } ),
128
    additional_field_values => { map { $_->field->name => $_->value } $subscription->additional_field_values->as_list },
128
    additional_field_values => { map { $_->field->name => $_->value } $subscription->additional_field_values->as_list },
129
- 

Return to bug 37247