[Koha-bugs] [Bug 5688] New: OPAC My Summary tab fines column doesn't display accruing fines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 3 14:45:18 CET 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5688

           Summary: OPAC My Summary tab fines column doesn't display
                    accruing fines
 Change sponsored?: ---
           Product: Koha
           Version: rel_3_4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: OPAC
        AssignedTo: oleonard at myacpl.org
        ReportedBy: jwagner at ptfs.com
         QAContact: koha-bugs at lists.koha-community.org
   Estimated Hours: 0.0


Created attachment 3059
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3059
screen shot of My Summary tab

Problem description copied from:
http://lists.katipo.co.nz/public/koha/2008-March/013387.html

"Long version: I'm using the script <KOHA>/bin/cronjobs/fines2.pl to
calculate fines on a nightly basis.  It works pretty well, but I
noticed that it has this line:

  UpdateFine($data->[$i]->{'itemnumber'},
  $data->[$i]->{'borrowernumber'},$amount,$type,$due);

This calls the UpdateFine subroutine in C4/Overdues.pm, which runs this
command:

    my $sth2 = $dbh->prepare(
      "INSERT INTO accountlines
      (borrowernumber,itemnumber,date,amount,
      description,accounttype,amountoutstanding,accountno) VALUES
      (?,?,now(),?,?,'FU',?,?)"
    );

Note how "FU" is hardcoded as the "accounttype" in this section.  But
when a patron is viewing his/her summary screen in the OPAC (i.e. 
http://www.example.net/cgi-bin/koha/opac-user.pl) and has an overdue
item, the line under "Fines" always says "No".

Why?  Because opac-user.pl has this bit of code:

    my $charges = 0;
    foreach my $ac (@$accts) {
        if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
            $charges += $ac->{'amountoutstanding'}
              if $ac->{'accounttype'} eq 'F';
            $charges += $ac->{'amountoutstanding'}
              if $ac->{'accounttype'} eq 'L';
        }
    }
    $issue->{'charges'} = $charges;

So, $charges is only going to be passed to the template if the
accounttype is "F" or "L".  But since C4/Overdues.pm is always setting
it to "FU", that will never happen, and the Summary screen will always
tell the patron they have no fines."



I tested this morning on current master/head, and this problem still seems to
exist.  The fines.pl script is setting accounttype to FU, and opac-user.pl is
still not displaying FU types of fines.  What are the implications (if any) of
adding FU to opac-user.pl?

See screenshot -- the fines display correctly under the separate My Fines tab,
but not in the Fines column of the My Summary tab.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Koha-bugs mailing list