|
Lines 25-34
use Modern::Perl;
Link Here
|
| 25 |
use CGI qw ( -utf8 ); |
25 |
use CGI qw ( -utf8 ); |
| 26 |
|
26 |
|
| 27 |
use C4::Auth; |
27 |
use C4::Auth; |
|
|
28 |
use C4::Context; |
| 28 |
use C4::Output; |
29 |
use C4::Output; |
| 29 |
use C4::Members; |
30 |
use C4::Members; |
| 30 |
use List::MoreUtils qw/any uniq/; |
31 |
use List::MoreUtils qw/any uniq/; |
| 31 |
use Koha::DateUtils; |
32 |
use Koha::DateUtils; |
|
|
33 |
use Koha::ActionLogs; |
| 32 |
|
34 |
|
| 33 |
use Koha::Patrons; |
35 |
use Koha::Patrons; |
| 34 |
use Koha::Patron::Categories; |
36 |
use Koha::Patron::Categories; |
|
Lines 60-65
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log
Link Here
|
| 60 |
my $order = 'date_due desc'; |
62 |
my $order = 'date_due desc'; |
| 61 |
my $limit = 0; |
63 |
my $limit = 0; |
| 62 |
my $issues = (); |
64 |
my $issues = (); |
|
|
65 |
my $logged_item_ids = {}; |
| 63 |
# Do not request the old issues of anonymous patron |
66 |
# Do not request the old issues of anonymous patron |
| 64 |
if ( $patron->borrowernumber eq C4::Context->preference('AnonymousPatron') ){ |
67 |
if ( $patron->borrowernumber eq C4::Context->preference('AnonymousPatron') ){ |
| 65 |
# use of 'eq' in the above comparison is intentional -- the |
68 |
# use of 'eq' in the above comparison is intentional -- the |
|
Lines 67-72
if ( $patron->borrowernumber eq C4::Context->preference('AnonymousPatron') ){
Link Here
|
| 67 |
$template->param( is_anonymous => 1 ); |
70 |
$template->param( is_anonymous => 1 ); |
| 68 |
} else { |
71 |
} else { |
| 69 |
$issues = GetAllIssues($patron->borrowernumber,$order,$limit); |
72 |
$issues = GetAllIssues($patron->borrowernumber,$order,$limit); |
|
|
73 |
# Establish if: |
| 74 |
# a) renewal logging is turned on |
| 75 |
# b) which of the issued items have corresponding renewal logs in the |
| 76 |
# action logs |
| 77 |
# This will determine whether we should show the "View" renewals link |
| 78 |
# A hashref of all log entries relating to renewals - ensures each item |
| 79 |
# id only appears once, it also aids lookup |
| 80 |
if (C4::Context->preference("RenewalLog")) { |
| 81 |
my $patron_renew_logs = Koha::ActionLogs->search( |
| 82 |
{ object => $patron->borrowernumber, action => 'RENEWAL' }, |
| 83 |
{ columns => [ qw/info/ ] } |
| 84 |
)->unblessed; |
| 85 |
foreach my $log(@{$patron_renew_logs}) { |
| 86 |
$logged_item_ids->{$log->{info}} = 1; |
| 87 |
} |
| 88 |
} |
| 70 |
} |
89 |
} |
| 71 |
|
90 |
|
| 72 |
# barcode export |
91 |
# barcode export |
|
Lines 99-104
$template->param(
Link Here
|
| 99 |
patron => $patron, |
118 |
patron => $patron, |
| 100 |
readingrecordview => 1, |
119 |
readingrecordview => 1, |
| 101 |
loop_reading => $issues, |
120 |
loop_reading => $issues, |
|
|
121 |
logged_items => $logged_item_ids |
| 102 |
); |
122 |
); |
| 103 |
output_html_with_http_headers $input, $cookie, $template->output; |
123 |
output_html_with_http_headers $input, $cookie, $template->output; |
| 104 |
|
124 |
|
| 105 |
- |
|
|