Adding warnings, fixing a bug that meant the title of an item that had a fine was...
authorChris Cormack <chrisc@catalyst.net.nz>
Fri, 1 May 2009 21:39:25 +0000 (09:39 +1200)
committerGalen Charlton <galen.charlton@liblime.com>
Fri, 1 May 2009 22:06:53 +0000 (17:06 -0500)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Members.pm
koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tmpl
opac/opac-account.pl

index c0af300..af32939 100644 (file)
@@ -1167,6 +1167,7 @@ sub GetMemberAccountRecords {
     while ( my $data = $sth->fetchrow_hashref ) {
                my $biblio = GetBiblioFromItemNumber($data->{itemnumber}) if $data->{itemnumber};
                $data->{biblionumber} = $biblio->{biblionumber};
+               $data->{title} = $biblio->{title};
         $acctlines[$numlines] = $data;
         $numlines++;
         $total += int(100 * $data->{'amountoutstanding'}); # convert float to integer to avoid round-off errors
index fba50c9..54d9156 100644 (file)
@@ -37,7 +37,7 @@
                     <!-- TMPL_IF NAME="odd" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
                         <td><!-- TMPL_VAR NAME="date" --></td>
                         <td><!-- TMPL_VAR NAME="description" -->
-                        <!-- TMPL_IF NAME="print_title" --><!-- TMPL_VAR NAME="title" escape="html" --><!-- /TMPL_IF --></td>
+                        <!-- TMPL_IF NAME="title" --><!-- TMPL_VAR NAME="title" escape="html" --><!-- /TMPL_IF --></td>
                         <!-- TMPL_IF NAME="amountcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF -->$<!-- TMPL_VAR NAME="amount" --></td>
                         <!-- TMPL_IF NAME="amountoutstandingcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF -->$<!-- TMPL_VAR NAME="amountoutstanding" --></td>
                     </tr>
index 95df842..43a1e0c 100755 (executable)
@@ -25,6 +25,7 @@ use C4::Circulation;
 use C4::Auth;
 use C4::Output;
 use C4::Dates qw/format_date/;
+use warnings;
 
 my $query = new CGI;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
@@ -59,11 +60,6 @@ for ( my $i = 0 ; $i < $numaccts ; $i++ ) {
     if ( $accts->[$i]{'amountoutstanding'} >= 0 ) {
         $accts->[$i]{'amountoutstandingcredit'} = 1;
     }
-    if (   $accts->[$i]{'accounttype'} ne 'F'
-        && $accts->[$i]{'accounttype'} ne 'FU' )
-    {
-        $accts->[$i]{'print_title'};   # FIXME: Useless use of hash element in void context
-    }
 }
 
 # add the row parity