From 14e64fedd62038e1169644e0d63a9fa4971bd261 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 2 Oct 2018 12:39:38 -0300 Subject: [PATCH] Bug 21467: Add subscription's info when ordering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ordering from a subscription, there is now a "hint" to display the number of issues and the frequency. It will be easier to estimate the quantity to receive. Signed-off-by: Séverine QUEUNE --- acqui/neworderempty.pl | 7 ++++++- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 968ceec..d768bf7 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -94,6 +94,7 @@ use Koha::MarcSubfieldStructures; use Koha::ItemTypes; use Koha::Patrons; use Koha::RecordProcessor; +use Koha::Subscriptions; our $input = new CGI; my $booksellerid = $input->param('booksellerid'); # FIXME: else ERROR! @@ -380,7 +381,11 @@ if ( defined $from_subscriptionid ) { $basket = GetBasket( $input->param('basketno') ); } - $template->param( subscriptionid => $from_subscriptionid ); + my $subscription = Koha::Subscriptions->find($from_subscriptionid); + $template->param( + subscriptionid => $from_subscriptionid, + subscription => $subscription, + ); } # Find the items.barcode subfield for barcode validations diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 7f21996..66c89d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -322,6 +322,16 @@ [% END %] + + [% IF subscription %] +
+ + Frequency: [% subscription.frequency.description | html %] | + [% IF subscription.numberlength %]Number of issues: [% subscription.numberlength | html %][% END %] + [% IF subscription.weeklength %]Number of weeks: [% subscription.weeklength | html %][% END %] + [% IF subscription.monthlength %]Number of months: [% subscription.monthlength | html %][% END %] + + [% END %]
  • [% IF ( close ) %] -- 2.1.4