From b7c61a5d128cc3580ea3ee67bc29e02571923dd3 Mon Sep 17 00:00:00 2001 From: Aleisha Date: Tue, 17 May 2016 04:46:31 +0000 Subject: [PATCH] Bug 16531: Circ overdue report is showing an empty table if no overdues EDIT: Comment 2 EDIT2: using noreport variable (Comment 5) To test: 1) Ensure you have no items overdue 2) Go to Circ -> Circulation reports -> Overdues 3) Notice empty table, '0 items overdue' heading 4) Ensure syspref FilterBeforeOverdueReport is set to 'Don't require' 5) Apply patch and refresh page 6) Notice empty table is no longer showing and page says "There are no overdues" 7) Apply a filter to search 8) Page now says "There are no overdues matching your search" with a link to reset filter. 9) Click Reset filter -> confirm any filters you applied are cleared. 10) Set FilterBeforeOverdueReport to 'Require' and refresh overdue report 11) Page should say "Please choose one or more filters to proceed" 12) Check out an item to a member, ensure due date is a date that has passed (i.e. yesterday) 13) Refresh overdue report page 14) Page should still say "Please choose one or more filters to proceed" 15) Set FilterBeforeOverdueReport to 'Don't require' 16) Confirm table now shows correctly with '1 items overdue' heading etc. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../prog/en/modules/circ/overdue.tt | 86 +++++++++++-------- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 4ebc7d21f3..64eb871018 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -78,55 +78,65 @@
[% IF ( noreport ) %] - -

Overdue report

- -

Please choose one or more filters to proceed.

- +

Overdue report

+

Please choose one or more filters to proceed.

[% ELSE %] -

[% nnoverdue %] [% IF ( noverdue_is_plural ) %]Items[% ELSE %]Item[% END %] -overdue as of [% todaysdate %][% IF ( isfiltered ) %] (Filtered. Reset filter)[% END %]

+[% IF ( overdueloop ) %] -

+

[% nnoverdue %] [% IF ( noverdue_is_plural ) %]Items[% ELSE %]Item[% END %] overdue as of [% todaysdate %][% IF ( isfiltered ) %] (Filtered. Reset filter)[% END %]

+ +

[% IF ( isfiltered ) %] Download file of displayed overdues [% ELSE %] Download file of all overdues [% END %] -

-
[% sql |html %]
-
- - - - - - - - - - - -[%- BLOCK subject -%]Overdue:[%- END -%] +

-[% FOREACH overdueloo IN overdueloop %] - - - - - - - - +
[% sql |html %]
+
+
Due datePatronLibraryTitleBarcodeCall numberPrice
[% overdueloo.duedate %][% overdueloo.surname %][% IF (overdueloo.firstname) %], [% overdueloo.firstname %][% END %] ([% overdueloo.cardnumber %]) - [% IF ( overdueloo.email ) %][email][% END %] - [% IF ( overdueloo.phone ) %]([% overdueloo.phone %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro %])[% END %][% IF overdueloo.branchcode %][% Branches.GetName( overdueloo.branchcode ) %][% END %][% INCLUDE 'biblio-default-view.inc' biblionumber = overdueloo.biblionumber %][% overdueloo.title |html %] [% overdueloo.subtitle %] [% IF ( overdueloo.author ) %], by [% overdueloo.author %][% END %][% IF ( overdueloo.enumchron ) %], [% overdueloo.enumchron %][% END %] - [% overdueloo.barcode %][% overdueloo.itemcallnumber %][% overdueloo.replacementprice %]
+ + + + + + + + + + + + [%- BLOCK subject -%]Overdue:[%- END -%] + + [% FOREACH overdueloo IN overdueloop %] + + + + + + + + -[% END %] -
Due datePatronLibraryTitleBarcodeCall numberPrice
[% overdueloo.duedate %][% overdueloo.surname %][% IF (overdueloo.firstname) %], [% overdueloo.firstname %][% END %] ([% overdueloo.cardnumber %]) + [% IF ( overdueloo.email ) %][email][% END %] + [% IF ( overdueloo.phone ) %]([% overdueloo.phone %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro %])[% END %][% IF overdueloo.branchcode %][% Branches.GetName( overdueloo.branchcode ) %][% END %][% INCLUDE 'biblio-default-view.inc' biblionumber = overdueloo.biblionumber %][% overdueloo.title |html %] [% overdueloo.subtitle %] [% IF ( overdueloo.author ) %], by [% overdueloo.author %][% END %][% IF ( overdueloo.enumchron ) %], [% overdueloo.enumchron %][% END %][% overdueloo.barcode %][% overdueloo.itemcallnumber %][% overdueloo.replacementprice %]
+ [% END %] + + +
-
+[% ELSE %] + +

Overdue report

+ [% IF ( isfiltered ) %] +

There are no overdues matching your search. Reset filter

+ [% ELSE %] +

There are no overdues.

+ [% END %] + +[% END %] [% END %] -- 2.39.5