From c991e36ef94e16060a22cf996041a958fac4fbdd 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. Sponsored-by: BULAC - http://www.bulac.fr/ 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 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 4a4ba1744e..7e65f3cbd6 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.11.0