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 <oleonard@myacpl.org>

This fixes the issues described for patrons with existing checkouts.
Signed-off-by: Mason James <mtj@kohaaloha.com>
This commit is contained in:
Kyle M Hall 2014-11-18 07:40:24 -05:00 committed by Mason James
parent 2926168aaa
commit ffe32fefc9
2 changed files with 15 additions and 12 deletions

View File

@ -41,20 +41,20 @@
<th>Status</th>
</tr>
[% FOREACH issueloo IN issues %]
[% IF ( issueloo.red ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
[% FOREACH issue IN issues %]
[% IF ( issue.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
<td>
[% issueloo.title |html %]
<a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issueloo.itemnumber %]&amp;biblionumber=[% issueloo.biblionumber %]&amp;bi=[% issueloo.biblioitemnumber %]"></a>
[% issue.title |html %]
<a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issue.itemnumber %]&amp;biblionumber=[% issue.biblionumber %]&amp;bi=[% issue.biblioitemnumber %]"></a>
</td>
<td>[% issueloo.author %]</td>
<td>[% issueloo.itemcallnumber %]</td>
<td>[% issueloo.itemtype_description %]</td>
<td>[% issueloo.date_due %]</td>
<td>[% issueloo.barcode %]</td>
<td>[% issueloo.charge %]</td>
<td>[% issueloo.replacementprice %]</td>
<td>[% IF ( issueloo.red ) %]Overdue![% ELSE %]&nbsp;[% END %]</td>
<td>[% issue.author %]</td>
<td>[% issue.itemcallnumber %]</td>
<td>[% issue.itemtype_description %]</td>
<td>[% issue.date_due | $KohaDates %]</td>
<td>[% issue.barcode %]</td>
<td>[% issue.charge %]</td>
<td>[% issue.replacementprice %]</td>
<td>[% IF ( issue.overdue ) %]Overdue![% ELSE %]&nbsp;[% END %]</td>
</tr>
[% END %]

View File

@ -97,5 +97,8 @@ sub build_issue_data {
push( @{$return}, \%row );
}
@{$return} = sort { $a->{date_due} <=> $b->{date_due} } @{$return};
return $return;
}