From bbe179a1d50bba9a7d101b42d05d924335bbff38 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 7 Sep 2018 13:46:12 -0300 Subject: [PATCH] Bug 15184: Set created_by to the logged in user MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- Koha/Acquisition/Order.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm index 8abfbdd197..da1e5ac7bd 100644 --- a/Koha/Acquisition/Order.pm +++ b/Koha/Acquisition/Order.pm @@ -242,7 +242,8 @@ sub duplicate_to { $order_info->{$field} = $value; } - # FIXME $order_info->{created_by} = logged_in_user? + my $userenv = C4::Context->userenv; + $order_info->{created_by} = $userenv->{number}; $order_info->{basketno} = $basket->basketno; $new_order = Koha::Acquisition::Order->new($order_info)->store; -- 2.39.5