From dc6d49d31816c72748044e9da2524c1d71028800 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 20 Feb 2019 10:51:21 +0000 Subject: [PATCH] Bug 21756: (QA follow-up) Fixes for rebase Signed-off-by: Martin Renvoize --- members/maninvoice.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/members/maninvoice.pl b/members/maninvoice.pl index d5e24497ff..52a8791d9d 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -80,9 +80,9 @@ if ($add){ my $amount=$input->param('amount'); my $type=$input->param('type'); my $note = $input->param('note'); + my $account = $patron->account; try { - my $account = $patron->account; - my $invoice = $account->add_debit( + $account->add_debit( { amount => $amount, item_id => $itemnum, @@ -93,17 +93,17 @@ if ($add){ ); if ( C4::Context->preference('AccountAutoReconcile') ) { - $patron->account->reconcile_balance; + $account->reconcile_balance; } } catch { - if ( $_->isa('Koha::Exceptions::Object::FKConstraint') $error =~ /FOREIGN KEY/ && $error =~ /itemnumber/ ) { + if ( $_->isa('Koha::Exceptions::Object::FKConstraint') && $_->error =~ /FOREIGN KEY/ && $_->error =~ /itemnumber/ ) { $template->param( 'ITEMNUMBER' => 1 ) if ($_->broken_fk eq 'itemnumber'); $template->param( 'ERROR' => $_->message ); } $template->param( csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }) ); output_html_with_http_headers $input, $cookie, $template->output; - }; + } print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber"); exit; -- 2.20.1