Bug 5688 - OPAC My Summary tab fines column doesn't display accruing fines
Summary: OPAC My Summary tab fines column doesn't display accruing fines
Status: RESOLVED DUPLICATE of bug 8079
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
Depends on:
Reported: 2011-02-03 13:45 UTC by Jane Wagner
Modified: 2013-02-17 20:41 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:

screen shot of My Summary tab (29.20 KB, image/jpeg)
2011-02-03 13:45 UTC, Jane Wagner

Note You need to log in before you can comment on or make changes to this bug.
Description Jane Wagner 2011-02-03 13:45:15 UTC
Created attachment 3059 [details]
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:


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

    my $sth2 = $dbh->prepare(
      "INSERT INTO accountlines
      description,accounttype,amountoutstanding,accountno) VALUES

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.
Comment 1 Katrin Fischer 2011-02-07 10:49:06 UTC
I have tested this on current master and current 3.2.x branch. The column fine on the opac summary page shows always 'No'. The 'Fines' tab on the same page and the 'My fines' tab show the fines and amounts correctly.
Comment 2 Katrin Fischer 2013-02-17 20:41:47 UTC

*** This bug has been marked as a duplicate of bug 8079 ***