From 5cdb3634e41008cfd2d23c727199593438e1777f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 9 Nov 2018 14:47:09 +0000 Subject: [PATCH] Bug 21702: Make mancredit.pl use the patron id for the staff user (RMaint) This is a simpler re-implimentation of 466e29263910c85ce6417f322dc505558eeaa8a3 and a90502043f12055b7e6b61f9c23d924d2e02b999 created for the 18.05.x series. Signed-off-by: Martin Renvoize --- members/mancredit.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/members/mancredit.pl b/members/mancredit.pl index f1d388d577..7d68067d42 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -74,13 +74,14 @@ if ($add){ my $amount = $input->param('amount') || 0; my $type = $input->param('type'); + my $logged_in_user = Koha::Patrons->find( { userid => $userid } ) or die "Not logged in"; Koha::Account->new({ patron_id => $borrowernumber })->add_credit({ amount => $amount, description => $description, item_id => $item_id, note => $note, type => $type, - user_id => $user_id + user_id => $logged_in_user->id }); print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber"); -- 2.39.5