[% END %]
|
- [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
+ [% IF checkout.onsite_checkout %][% issuetype = 'onsite_checkout' | html %]
[% ELSE %][% issuetype = 'standard_checkout' | html %]
[% END %]
[% issuetype | html %]
|
-
- [% issue.issuestimestamp | $KohaDates with_hours => 1 %]
+ |
+ [% checkout.timestamp | $KohaDates with_hours => 1 %]
|
- [% INCLUDE 'biblio-title.inc' biblio=issue link = 1 %]
+ [% INCLUDE 'biblio-title.inc' biblio=biblio link = 1 %]
|
- [% issue.author | html %] |
+ [% biblio.author | html %] |
- [% IF issue.classification %]
- [% issue.classification | html %]
- [% ELSE %]
- [% issue.itemcallnumber | html %]
+ [% item.itemcallnumber | html %]
+ |
+
+
+ [% IF item.enumchron %]
+ [% item.enumchron | html %]
[% END %]
|
+ [% item.barcode | html %] |
- [% IF issue.enumchron %]
- [% issue.enumchron | html %]
+ [% checkout.renewals_count | html %]
+ [% IF checkout.renewals_count > 0 %]
+ [ View ]
[% END %]
|
-
- [% issue.barcode | html %] |
-
- [% issue.renewals_count | html %]
- [% IF issue.renewals_count > 0 %]
- [ View ]
- [% END %]
+ |
+ [% checkout.issuedate | $KohaDates with_hours => 1 %]
|
-
- [% issue.issuedate |$KohaDates with_hours => 1 %]
- |
- [% Branches.GetName( issue.branchcode ) | html %] |
+ [% Branches.GetName( checkout.branchcode ) | html %] |
[% IF Koha.Preference('RecordStaffUserOnCheckout') %]
- [% issue.firstname | html %] [% issue.surname | html %] |
+ [% SET issuer = checkout.issuer %]
+ [% issuer.firstname | html %] [% issuer.surname | html %] |
[% END %]
-
- [% issue.date_due | $KohaDates as_due_date => 1 %]
+ |
+ [% checkout.date_due | $KohaDates as_due_date => 1 %]
|
- [% IF issue.returndate %]
-
- [% issue.returndate |$KohaDates with_hours => 1 %]
+ [% IF checkout.returndate %]
+ |
+ [% checkout.returndate | $KohaDates with_hours => 1 %]
[% ELSE %]
|
Checked out
diff --git a/members/readingrec.pl b/members/readingrec.pl
index 0dcdab25ce..08eff9f010 100755
--- a/members/readingrec.pl
+++ b/members/readingrec.pl
@@ -26,7 +26,6 @@ use CGI qw ( -utf8 );
use C4::Auth qw( get_template_and_user );
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
-use C4::Members qw( GetAllIssues );
use List::MoreUtils qw( any uniq );
use Koha::DateUtils qw( dt_from_string );
use Koha::ActionLogs;
@@ -79,26 +78,39 @@ if ( $op eq 'export_barcodes' ) {
}
}
-my $order = 'date_due desc';
-my $limit = 0;
-my $issues = ();
# Do not request the old issues of anonymous patron
if ( $patron->borrowernumber eq C4::Context->preference('AnonymousPatron') ){
# use of 'eq' in the above comparison is intentional -- the
# system preference value could be blank
$template->param( is_anonymous => 1 );
} else {
- $issues = GetAllIssues($patron->borrowernumber,$order,$limit);
-}
-
-if (! $limit){
- $limit = 'full';
+ $template->param(
+ checkouts => [
+ $patron->checkouts(
+ {},
+ {
+ order_by => 'date_due desc',
+ prefetch => { item => { biblio => 'biblioitems' } },
+ }
+ )->as_list
+ ]
+ );
+ $template->param(
+ old_checkouts => [
+ $patron->old_checkouts(
+ {},
+ {
+ order_by => 'date_due desc',
+ prefetch => { item => { biblio => 'biblioitems' } },
+ }
+ )->as_list
+ ]
+ );
}
$template->param(
patron => $patron,
readingrecordview => 1,
- loop_reading => $issues
);
output_html_with_http_headers $input, $cookie, $template->output;
|