View | Details | Raw Unified | Return to bug 12001
Collapse All | Expand All

(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 543-549 foreach my $flag ( sort keys %$flags ) { Link Here
543
my $amountold = $flags ? $flags->{'CHARGES'}->{'message'} || 0 : 0;
543
my $amountold = $flags ? $flags->{'CHARGES'}->{'message'} || 0 : 0;
544
$amountold =~ s/^.*\$//;    # remove upto the $, if any
544
$amountold =~ s/^.*\$//;    # remove upto the $, if any
545
545
546
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
546
my $total = $patron ? $patron->account->balance : 0;
547
547
548
if ( $patron && $patron->category->category_type eq 'C') {
548
if ( $patron && $patron->category->category_type eq 'C') {
549
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
549
    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
(-)a/opac/opac-main.pl (-1 / +3 lines)
Lines 29-34 use C4::Members; Link Here
29
use C4::Overdues;
29
use C4::Overdues;
30
use Koha::Checkouts;
30
use Koha::Checkouts;
31
use Koha::Holds;
31
use Koha::Holds;
32
use Koha::Patrons;
32
33
33
my $input = new CGI;
34
my $input = new CGI;
34
my $dbh   = C4::Context->dbh;
35
my $dbh   = C4::Context->dbh;
Lines 72-78 if ( defined $borrowernumber ){ Link Here
72
    my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
73
    my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
73
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
74
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
74
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
75
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
75
    my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
76
    my $patron = Koha::Patrons->find( $borrowernumber );
77
    my $total = $patron ? $patron->account->balance : 0;
76
78
77
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) {
79
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) {
78
        $template->param( dashboard_info => 1 );
80
        $template->param( dashboard_info => 1 );
(-)a/opac/opac-reserve.pl (-1 / +2 lines)
Lines 329-335 if ( $query->param('place_reserve') ) { Link Here
329
my $noreserves     = 0;
329
my $noreserves     = 0;
330
my $maxoutstanding = C4::Context->preference("maxoutstanding");
330
my $maxoutstanding = C4::Context->preference("maxoutstanding");
331
$template->param( noreserve => 1 ) unless $maxoutstanding;
331
$template->param( noreserve => 1 ) unless $maxoutstanding;
332
my ( $amountoutstanding ) = GetMemberAccountRecords($borrowernumber);
332
my $amountoutstanding = $patron ? $patron->account->balance : 0;
333
333
if ( $amountoutstanding && ($amountoutstanding > $maxoutstanding) ) {
334
if ( $amountoutstanding && ($amountoutstanding > $maxoutstanding) ) {
334
    my $amount = sprintf "%.02f", $amountoutstanding;
335
    my $amount = sprintf "%.02f", $amountoutstanding;
335
    $template->param( message => 1 );
336
    $template->param( message => 1 );
(-)a/opac/opac-user.pl (-1 / +3 lines)
Lines 116-122 if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { Link Here
116
    $canrenew = 0;
116
    $canrenew = 0;
117
}
117
}
118
118
119
my ( $amountoutstanding ) = GetMemberAccountRecords($borrowernumber);
119
my $patron = Koha::Patrons->find( $borrowernumber );
120
my $amountoutstanding = $patron ? $patron->account->balance : 0;
121
120
if ( $amountoutstanding > 5 ) {
122
if ( $amountoutstanding > 5 ) {
121
    $borr->{'amountoverfive'} = 1;
123
    $borr->{'amountoverfive'} = 1;
122
}
124
}
(-)a/reserve/request.pl (-2 / +1 lines)
Lines 198-204 if ($borrowernumber_hold && !$action) { Link Here
198
                messages            => $messages,
198
                messages            => $messages,
199
                warnings            => $warnings,
199
                warnings            => $warnings,
200
                restricted          => $is_debarred,
200
                restricted          => $is_debarred,
201
                amount_outstanding  => GetMemberAccountRecords($patron->borrowernumber),
201
                amount_outstanding  => $patron->account->balance,
202
    );
202
    );
203
}
203
}
204
204
205
- 

Return to bug 12001