@@ -, +, @@
anonymous patron
- Set syspref AnonymousPatron to 0.
- Select a borrower with old issues. For example 123.
- Look at its reading records page : members/readingrec.pl
- Set syspref AnonymousPatron with this borrower number. For example 123.
- Look at its reading records page
- Using SQL query, remove old issues of this borrower : DELETE FROM old_issues WHERE borrowernumber=123.
- Look at its reading records page
---
.../prog/en/modules/members/readingrec.tt | 9 ++++++---
members/readingrec.pl | 8 +++++++-
2 files changed, 13 insertions(+), 4 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
@@ -46,7 +46,12 @@
[% INCLUDE 'members-toolbar.inc' %]
Circulation history
-[% IF loop_reading %]
+
+[% IF is_anonymous %]
+
This is the anonymous patron.
+[% ELSIF ( !loop_reading ) %]
+
This patron has no circulation history.
+[% ELSE %]
@@ -101,8 +106,6 @@
[% END %]
-[% ELSE %]
-
This patron has no circulation history.
[% END %]
--- a/members/readingrec.pl
+++ a/members/readingrec.pl
@@ -63,7 +63,13 @@ if ($input->param('borrowernumber')) {
my $order = 'date_due desc';
my $limit = 0;
-my $issues = GetAllIssues($borrowernumber,$order,$limit);
+my $issues = ();
+# Do not request the old issues of anonymous patron
+if ( $borrowernumber == C4::Context->preference('AnonymousPatron') ){
+ $template->param( is_anonymous => 1 );
+} else {
+ $issues = GetAllIssues($borrowernumber,$order,$limit);
+}
my $branches = GetBranches();
foreach my $issue ( @{$issues} ) {
--