Bug 21702: Make mancredit.pl use the patron id for the staff user

(RMaint) This is a simpler re-implimentation of
466e292639 and
a90502043f created for the 18.05.x series.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2018-11-09 14:47:09 +00:00
parent bc9408f9ac
commit 5cdb3634e4
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 2 additions and 1 deletions

View File

@ -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");