diff --git a/C4/Members.pm b/C4/Members.pm index 79635986ac..bcb0f00e06 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1132,10 +1132,11 @@ sub GetBorNotifyAcctRecord { FROM accountlines WHERE borrowernumber=? AND notify_id=? - AND (accounttype='FU' OR accounttype='N' OR accounttype='M'OR accounttype='A'OR accounttype='F'OR accounttype='L' OR accounttype='IP' OR accounttype='CH' OR accounttype='RE' OR accounttype='RL') AND amountoutstanding != '0' ORDER BY notify_id,accounttype "); +# AND (accounttype='FU' OR accounttype='N' OR accounttype='M'OR accounttype='A'OR accounttype='F'OR accounttype='L' OR accounttype='IP' OR accounttype='CH' OR accounttype='RE' OR accounttype='RL') + $sth->execute( $borrowernumber, $notifyid ); my $total = 0; while ( my $data = $sth->fetchrow_hashref ) { diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 7cf64ab883..87dfbb64a6 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -695,9 +695,9 @@ return $result; } -=item AmountNotify +=item NumberNotifyId -(@notify) = &AmountNotify($borrowernumber); +(@notify) = &NumberNotifyId($borrowernumber); Returns amount for all file per borrowers C<@notify> array contains all file per borrowers @@ -733,19 +733,19 @@ C<$notifyid> is the file number C<$totalnotify> contains amount of a file -C<$notify_id> contains the file number for the borrower number nad item number +C<$notify_id> contains the file number for the borrower number and item number =cut sub AmountNotify{ - my ($notifyid)=@_; + my ($notifyid,$borrowernumber)=@_; my $dbh = C4::Context->dbh; my $query=qq| SELECT sum(amountoutstanding) FROM accountlines - WHERE notify_id=?|; + WHERE notify_id=? AND borrowernumber = ?|; my $sth=$dbh->prepare($query); - $sth->execute($notifyid); - my $totalnotify=$sth->fetchrow; + $sth->execute($notifyid,$borrowernumber); + my $totalnotify=$sth->fetchrow; $sth->finish; return ($totalnotify); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl index c80f9a0845..a3bcaa026c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl @@ -49,11 +49,14 @@