From b9149799e36e1b34f8504cd57edf63f27f061d93 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=utf8 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. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- acqui/neworderempty.pl | 7 ++++++- .../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 968ceece65..d768bf7882 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 ab07b1a89a..30879f3de6 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.39.5