From 55ac115e613f40e46af71fca8c52d880a755fcc1 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Tue, 14 Aug 2007 19:06:49 +0200 Subject: [PATCH] fixes to fine management Signed-off-by: Chris Cormack --- C4/Accounts.pm | 3 ++- .../prog/en/members/boraccount.tmpl | 21 +++++++++++-------- members/boraccount.pl | 2 +- members/maninvoice.pl | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index d47c4386c2..c03a0cde6f 100755 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -270,7 +270,7 @@ EOT sub returnlost { my ( $borrowernumber, $itemnum ) = @_; my $dbh = C4::Context->dbh; - my $borrower = GetMember( $borrowernumber, 'borrowernumber' ); + my $borrower = C4::Members::GetMember( $borrowernumber, 'borrowernumber' ); my $sth = $dbh->prepare( "UPDATE issues SET returndate=now() WHERE borrowernumber=? AND itemnumber=? AND returndate IS NULL" @@ -367,6 +367,7 @@ sub manualinvoice { $sth->execute( $borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $notifyid ); } + return 0; } =head2 fixcredit diff --git a/koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl b/koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl index 31218e0eeb..e78c8024c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl @@ -5,8 +5,19 @@ - + + +

Account for

@@ -34,13 +45,5 @@
- - diff --git a/members/boraccount.pl b/members/boraccount.pl index 7c27d80887..32ecb2c28e 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -50,7 +50,7 @@ my $borrowernumber=$input->param('borrowernumber'); my $data=GetMember($borrowernumber,'borrowernumber'); #get account details -my ($numaccts,$accts,$total)=GetMemberAccountRecords($borrowernumber); +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); my $totalcredit; if($total <= 0){ $totalcredit = 1; diff --git a/members/maninvoice.pl b/members/maninvoice.pl index 00157da8d8..4652095e47 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -35,7 +35,6 @@ my $borrowernumber=$input->param('borrowernumber'); # get borrower details my $data=GetMember($borrowernumber,'borrowernumber'); my $add=$input->param('add'); - if ($add){ # print $input->header; my $itemnum=$input->param('itemnum'); @@ -63,6 +62,7 @@ if ($add){ } else { print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber"); + exit; } } else { my ($template, $loggedinuser, $cookie) -- 2.39.5