Bug 20914 - Internal server error in OPAC
Summary: Internal server error in OPAC
Status: RESOLVED DUPLICATE of bug 20832
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-12 13:33 UTC by Stefan Berndtsson
Modified: 2018-06-12 14:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Berndtsson 2018-06-12 13:33:21 UTC
opac-user.pl tries to fetch an invalid column when calculating fines.

my $rental_fines = Koha::Account::Lines->search(
    {
        borrowernumber    => $patron->borrowernumber,
        amountoutstanding => { '>' => 0 },
        accounttype       => 'Rent',
        itemnumber        => $issue->{itemnumber}
    },
    {
        select => [ { sum => 'amountoutstanding' } ],
        as     => ['rental_fines']
    }
);
$issue->{rentalfines} = $charges->count ? $charges->next->get_column('rental_fines') : 0;

This code fetches the column "rental_fines" into the variable "$rental_fines", but then tries
to read that column data from a different variable ("$charges").
Comment 1 Jonathan Druart 2018-06-12 14:04:08 UTC

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