Bug 9451: Quiet warnings and Plackify borrower_stats.pl

There are several warnings and one non-Plack-compatible variable in
reports/borrower_stats.pl.

To test:
1) Apply patch
2) Use the borrower report wizard to create a report that includes an
   extended patron attribute.
3) Check the logs, and make sure that you don't see any of the
   following messages:
   Variable "$period" is not available at
     /home/jcamins/kohaclone/reports/borrowers_stats.pl line 265.
   Use of uninitialized value in hash element at
     /home/jcamins/kohaclone/reports/borrowers_stats.pl line 375.
   Use of uninitialized value in hash element at
     /home/jcamins/kohaclone/reports/borrowers_stats.pl line 376.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9451' into 3.12-master
Bug 9320 Pending reserves report should not show waiting items

    Test plan : * chose an item reserved by multiple patrons.
                * return the item and confirm reservation =>
                  item is waiting to be picked up
                * run circ/pendingreserves.pl
                    => without patch, this item is shown in the list
                    => with the patch, only really available items are show.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Works according to test plan. The title with one waiting item appeared
in pending holds report before the patch, doesn't appear after the
patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9320' into 3.12-master
Bug 9329: Wrong message for already expired cards

Previously users would see the same message whether their card was about
to expire or was already expired. This patch adds a new message to
handle cards which are about to expire, following the
NotifyBorrowerDeparture system preference.

TEST PLAN :

The best way to test would to have at the same time :
- a SQL client to change the expiry date of a borrower
- an OPAC session opened for the same patron.

Case 1: expiry date is set in the future
-> no warning

Case 2: expiry date is set in the near future (within the
"NotifyBorrowerDeparture" system preference range)
-> a warning says the card will expire on **date**

Case 3: expiry date is set in the past
-> before patch, same warning as Case 2
-> after patch, new warning indicating that the card has expired

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Added description to the patch and copied test plan from the bug report.
Patch passes test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9329' into 3.12-master
Bug 9332: Display call number in "Holds waiting" notice

When checking out from a patron page, a notice "Holds waiting" appears
if a biblio (on hold) is waiting for this borrower.
This patch adds the call number information to this warning.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Nice little improvement, thanks.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9332' into 3.12-master
Bug 9417 - Allow number of results per page to be selectable for guided reports

This patch adds the ability to select the number of row to show per page while
retaining the default rows per page as 20.

Test Plan:
1) Apply patch
2) Run a guided report that will have many resultant rows
3) Try the various rows per page options
4) Verify the rows per page selected is retained when paging through results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9417' into 3.12-master
Bug 9283 - Change structure of export checkouts form

This patch changes the structure of the export checkouts form
so that it is a little more linear. This change moves generation of the
export options from JavaScript to the markup, eliminating an instance
of dependence on YUI menus.

To test, enable checkout exports by specifying a value for
ExportWithCsvProfile or  ExportRemoveFields. Load a patron with
checkouts in circulation. Try the various checkout export options. Each
should function correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9283' into 3.12-master