Bugzilla – Attachment 135879 Details for
Bug 8694
Show accurate subscription renewal warning for expired subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8694: Show accurate subscription renewal warning for expired subscriptions
Bug-8694-Show-accurate-subscription-renewal-warnin.patch (text/plain), 2.88 KB, created by
Jonathan Druart
on 2022-06-09 12:11:08 UTC
(
hide
)
Description:
Bug 8694: Show accurate subscription renewal warning for expired subscriptions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-06-09 12:11:08 UTC
Size:
2.88 KB
patch
obsolete
>From 4b6693ee012046d527c4619d45430a662bde5728 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Dec 2020 14:42:03 +0100 >Subject: [PATCH] Bug 8694: Show accurate subscription renewal warning for > expired subscriptions > >If a subscription is going to expired we should not phrase the warning > "Subscription will expire [ date in the past ]." > >Test plan: >Create a subscription with relevant expiration date. >The detail page of the subscription show correctly the warning about the >expiration date. > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > .../prog/en/modules/serials/subscription-detail.tt | 6 ++++-- > serials/subscription-detail.pl | 3 ++- > 2 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index f6f4b3fe5ae..c379e2ce6bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -52,8 +52,10 @@ > > <h1>Subscription for [% bibliotitle | html %] [% bibliosubtitle | html %] [% IF closed %](closed)[% END %]</h1> > >- [% IF ( abouttoexpire ) %] >- [% UNLESS closed %] >+ [% IF abouttoexpire AND NOT closed %] >+ [% IF has_expired_already %] >+ <div class="dialog message">Subscription expired on [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div> >+ [% ELSE %] > <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div> > [% END %] > [% END %] >diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl >index 2ae5cd3ef74..373ab62d663 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -25,7 +25,7 @@ use C4::Search qw( enabled_staff_search_views ); > > use Koha::AdditionalFields; > use Koha::AuthorisedValues; >-use Koha::DateUtils qw( output_pref ); >+use Koha::DateUtils qw( output_pref dt_from_string ); > use Koha::Acquisition::Bookseller; > use Koha::Subscriptions; > >@@ -117,6 +117,7 @@ $subs->{location} = $av->count ? $av->next->lib : ''; > $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $subs->{ccode} }); > $subs->{ccode} = $av->count ? $av->next->lib : ''; > $subs->{abouttoexpire} = abouttoexpire($subs->{subscriptionid}); >+$subs->{has_expired_already} = dt_from_string($subs->{enddate})->compare(dt_from_string); > $template->param(%{ $subs }); > $template->param(biblionumber_for_new_subscription => $subs->{bibnum}); > my @irregular_issues = split /;/, $subs->{irregularity}; >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8694
:
11871
|
11907
|
114437
|
115246
| 135879