From 825bbfb1d91976c1b732f564dc35e08829295715 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 29 Jul 2019 20:05:42 +0000 Subject: [PATCH] Bug 23376: Move AcqCreateItem logic to template --- acqui/orderreceive.pl | 13 ------------- .../prog/en/modules/acqui/orderreceive.tt | 21 +++++++++++---------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index fb08d0a5a9..0d732923f3 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -114,18 +114,6 @@ unless($acq_fw) { $template->param('NoACQframework' => 1); } -my $AcqCreateItem = $basket->effective_create_items; -if ($AcqCreateItem eq 'receiving') { - $template->param( - AcqCreateItemReceiving => 1, - UniqueItemFields => C4::Context->preference('UniqueItemFields'), - ); -} elsif ($AcqCreateItem eq 'ordering') { - my $fw = ($acq_fw) ? 'ACQ' : ''; - my $items = $order->items; - $template->param(items => $items); -} - my $suggestion = GetSuggestionInfoFromBiblionumber($order->{biblionumber}); my $creator = Koha::Patrons->find( $order->created_by ); @@ -161,7 +149,6 @@ if ( $order->subscriptionid ) { } $template->param( - AcqCreateItem => $AcqCreateItem, count => 1, order => $order, name => $bookseller->name, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 7c9fe7b4cf..0627fb291d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -19,6 +19,7 @@
+ [% AcqCreateItem = order.basket.effective_create_items %]
@@ -111,7 +112,7 @@ - [% ELSIF (AcqCreateItemReceiving) %] + [% ELSIF (AcqCreateItem == 'receiving') %]