Lines 430-436
sub patronflags {
Link Here
|
430 |
my %flags; |
430 |
my %flags; |
431 |
my ( $patroninformation) = @_; |
431 |
my ( $patroninformation) = @_; |
432 |
my $dbh=C4::Context->dbh; |
432 |
my $dbh=C4::Context->dbh; |
433 |
my ($ballance, $owing) = GetMemberAccountBallance( $patroninformation->{'borrowernumber'}); |
433 |
my ($balance, $owing) = GetMemberAccountBallance( $patroninformation->{'borrowernumber'}); |
434 |
if ( $owing > 0 ) { |
434 |
if ( $owing > 0 ) { |
435 |
my %flaginfo; |
435 |
my %flaginfo; |
436 |
my $noissuescharge = C4::Context->preference("noissuescharge") || 5; |
436 |
my $noissuescharge = C4::Context->preference("noissuescharge") || 5; |
Lines 441-450
sub patronflags {
Link Here
|
441 |
} |
441 |
} |
442 |
$flags{'CHARGES'} = \%flaginfo; |
442 |
$flags{'CHARGES'} = \%flaginfo; |
443 |
} |
443 |
} |
444 |
elsif ( $ballance < 0 ) { |
444 |
elsif ( $balance < 0 ) { |
445 |
my %flaginfo; |
445 |
my %flaginfo; |
446 |
$flaginfo{'message'} = sprintf "Patron has credit of \$%.02f", -$ballance; |
446 |
$flaginfo{'message'} = sprintf "Patron has credit of \$%.02f", -$balance; |
447 |
$flaginfo{'amount'} = sprintf "%.02f", $ballance; |
447 |
$flaginfo{'amount'} = sprintf "%.02f", $balance; |
448 |
$flags{'CREDITS'} = \%flaginfo; |
448 |
$flags{'CREDITS'} = \%flaginfo; |
449 |
} |
449 |
} |
450 |
if ( $patroninformation->{'gonenoaddress'} |
450 |
if ( $patroninformation->{'gonenoaddress'} |
Lines 1142-1148
sub GetMemberAccountRecords {
Link Here
|
1142 |
|
1142 |
|
1143 |
=head2 GetMemberAccountBallance |
1143 |
=head2 GetMemberAccountBallance |
1144 |
|
1144 |
|
1145 |
($total_ballance, $non_issue_ballance, $other_charges) = &GetMemberAccountBallance($borrowernumber); |
1145 |
($total_balance, $non_issue_balance, $other_charges) = &GetMemberAccountBallance($borrowernumber); |
1146 |
|
1146 |
|
1147 |
Calculates amount immediately owing by the patron - non-issue charges. |
1147 |
Calculates amount immediately owing by the patron - non-issue charges. |
1148 |
Based on GetMemberAccountRecords. |
1148 |
Based on GetMemberAccountRecords. |
1149 |
- |
|
|