Display amount of credit patron has, not just that they have credit.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Will Stokes 2010-02-17 14:34:07 +13:00 committed by Galen Charlton
parent 5b33873c21
commit f27c5ae5a1
2 changed files with 7 additions and 3 deletions

View File

@ -561,7 +561,8 @@ foreach my $flag ( sort keys %$flags ) {
elsif ( $flag eq 'CREDITS' ) {
$template->param(
credits => 'true',
creditsmsg => $flags->{'CREDITS'}->{'message'}
creditsmsg => $flags->{'CREDITS'}->{'message'},
creditsamount => sprintf("%.02f", -($flags->{'CREDITS'}->{'amount'})), # from patron's pov
);
}
}
@ -577,7 +578,8 @@ foreach my $flag ( sort keys %$flags ) {
elsif ( $flag eq 'CREDITS' ) {
$template->param(
credits => 'true',
creditsmsg => $flags->{'CREDITS'}->{'message'}
creditsmsg => $flags->{'CREDITS'}->{'message'},
creditsamount => sprintf("%.02f", -($flags->{'CREDITS'}->{'amount'})), # from patron's pov
);
}
elsif ( $flag eq 'ODUES' ) {

View File

@ -523,7 +523,9 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="credits" -->
<li><span class="circ-hlt">Credits:</span> Patron has a credit</li>
<li>
<span class="circ-hlt">Credits:</span> Patron has a credit<!-- TMPL_IF NAME="creditsamount" --> of <!-- TMPL_VAR name="creditsamount" --><!-- /TMPL_IF -->
</li>
<!-- /TMPL_IF -->