Bug 11218: Regression tests for Due notice generation

Changes tests for GetUpcomingDueIssues:

days_in_advance should be inclusive:
 2 should find items due in 2 days from now.
 1 should find items due tomorrow.
 0 should only find items due today.

Adds new tests for Bug 11218:

As the advance_notices.pl, the only script using GetUpcomingDueIssues
is not only used for PREDUE notices, but also for
DUE notices, we need to also select items due today.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Rebased for 3.12.x
Bug 11218: fix Item Due notices not being generated

To test:
- Check out at least 3 items, due dates should be today, sometime in
  the past and one day after tomorrow.
- Edit the message options - activate DUE and PREDUE notices with
  days in advance = 2
- Run the advance_notices.pl script with -v -c
  Result: Only a PREDUE notice is generated
- Run the advance_notices.pl script with -v -c -m 2
  Result: Only the PREDUE message is generated correctly.
- Run t/db_dependent/Circulation.t
  - without first patch: all tests pass.
  - with first patch: some tests will fail.
- Apply patch.
- Rerun script, now PREDUE and DUE notices should be
  generated.
- Run t/db_dependent/Circulation.t again, all tests should pass.

Add more items with different due dates, rerun and check results.

Run t/Circulation.t to confirm all tests pass.
- Apply the patch

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Passes functional tests and automated tests.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a8bc7c9ef8222d0c9292ff5a93f3ecb8d68a2eed)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11218: (follow-up) fix some whitespace and a variable declaration

Fixing some things the QA script pointed out this morning:

- whitespace
- variable declaration

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1528a6deda468dc4a7391ea7a9fff60c57af314f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11218: (follow-up) fix whitespace

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 87470f394aa58e7ea1d89cadffc8d724b433cd80)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>