From d50c0e8646bfe1e4d0b7b094fcc1678104a76d16 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 18 Nov 2014 07:40:24 -0500 Subject: [PATCH] Bug 12971 [QA Followup] * Makes the status column display "Overdue!" if overdue * Fixes the due date formatting * Sorts the checkouts by date due ( oldest to newest ) Note: I found no evidence that this data was previously sorted, so I kept it simple. Sorting based on system preferences could be a future enhancement. --- .../prog/en/modules/members/moremember-print.tt | 24 ++++++++++---------- members/summary-print.pl | 3 ++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index e60a8e1..1d62a23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -41,20 +41,20 @@ Status - [% FOREACH issueloo IN issues %] - [% IF ( issueloo.red ) %][% ELSE %][% END %] + [% FOREACH issue IN issues %] + [% IF ( issue.overdue ) %][% ELSE %][% END %] - [% issueloo.title |html %] - + [% issue.title |html %] + - [% issueloo.author %] - [% issueloo.itemcallnumber %] - [% issueloo.itemtype_description %] - [% issueloo.date_due %] - [% issueloo.barcode %] - [% issueloo.charge %] - [% issueloo.replacementprice %] - [% IF ( issueloo.red ) %]Overdue![% ELSE %] [% END %] + [% issue.author %] + [% issue.itemcallnumber %] + [% issue.itemtype_description %] + [% issue.date_due | $KohaDates %] + [% issue.barcode %] + [% issue.charge %] + [% issue.replacementprice %] + [% IF ( issue.overdue ) %]Overdue![% ELSE %] [% END %] [% END %] diff --git a/members/summary-print.pl b/members/summary-print.pl index ea227dd..208d2f9 100755 --- a/members/summary-print.pl +++ b/members/summary-print.pl @@ -97,5 +97,8 @@ sub build_issue_data { push( @{$return}, \%row ); } + + @{$return} = sort { $a->{date_due} <=> $b->{date_due} } @{$return}; + return $return; } -- 1.7.2.5