From 2ca4841ea4daa109cb4310a22d88de15d915c373 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. Signed-off-by: Owen Leonard This fixes the issues described for patrons with existing checkouts. Signed-off-by: Tomas Cohen Arazi --- .../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 e60a8e13ce..1d62a239f5 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 ea227dd6f0..208d2f9b20 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; } -- 2.39.5