From 4a09781e698eead9a2b2415e98f89d00934a6351 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 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. --- 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 0e6f2c14c2..a90d6dfb63 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! @@ -383,7 +384,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 4cd4937564..450d47c4df 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -321,6 +321,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.11.0