Bug 11204: make pendingreserves use datatables.inc

A JS error occurs on the pending reserves (holds to pull) page:

ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined
if(CONFIG_EXCLUDE_ARTICLES_FROM_SORT){

Test plan:
Apply the patch and verify the error does not appear anymore.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Merge branch 'new/bug11218' into 3.14.x
Merge branch 'new/bug11159' into 3.14.x
Merge branch 'new/bug11205' into 3.14.x
Merge branch 'new/bug11216' into 3.14.x
Merge branch 'new/bug11137' into 3.14.x
Merge branch 'new/bug10684_take2' into 3.14.x
Merge branch 'new/bug11196' into 3.14.x
Merge branch 'new/bug11240' into 3.14.x
Merge branch 'new/bug10670' into 3.14.x
Merge branch 'new/bug10671' into 3.14.x
Merge branch 'new/bug11185' into 3.14.x
Merge branch 'new/bug11163' into 3.14.x
Bug 11221: ensure that SQLHelper uses NULL rather than 0000-00-00 as default date value

The default values for date fields is undef, so if a date field contains
an empty string, we should insert NULL in the DB, not 0000-00-00.
The format_date_in_iso routine should be only called if a date is
defined, is not equal to an empty string and does not match the iso
regex.

This patch fixes a bug where editing or creating a patron record
without setting the birth date results in 0000-00-00 rather than null
being set as the dateofbirth value.

Partial test plan:
1. Create a new patron. Leave dateofbirth empty.
2. Save the record.
3. Open the record for editing.
4. Save the record without making changes.
5. Koha gives no error.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Now when no date is given NULL is saved to the database.

Tested:
- Adding a patron without date of birth
- Editing the patron, entering a date of birth
- Editing the patron, deleting date of birth
All worked as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11221: (follow-up) add unit test to test handling empty strings as dates

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11221: (follow-up) test for NULL rather than empty string

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Merge branch 'new/bug11221'
Merge branch 'new/bug11221' into 3.14.x
bug 8854: fix some invoice search filters

Fix the supplier, shipment date, and library filters
on the invoice search.  An invoice's library is
(in parallel with order search) defined as the library
of the staff member that approved the basket.  Before this
patch, the code was referring to an aqorders.branchcode
column that doesn't exist.

This patch also improves the author, title, ISBN/EAN/ISSN,
publisher, and publication year filters to no longer require
exact matches; substring matches now suffice.

Finally, this patch considers biblio.copyrightdate in addition
to biblioitems.publicationyear for publication date searches, as
the MARC21 frameworks use the former column but not the latter.

This patch also fixes the current test cases for invoices
so that they pass and adds regression tests.

Test plan:

[1] Create two invoices for different vendors.
[2] Do an invoice search and filter on shipment
    date.  Verify that the expected invoice(s)
    are returned.
[3] Do an invoice search and filter on branch
    (of the staff member that approved the basket).
    Verify that the expected invoice(s) are returned.
[4] Do an invoice search and filter on supplier.
    Verify that the expected invoice(s) are returned.
[5] Do invoice searches on author, title, ISBN/EAN/ISSN,
    publisher, and publication year and verify that the
    results are as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Patch passes all tests, test plan and QA script.

(Adding from Katrin notes early) I agree with
Possible improvements:
- Document the behaviour of the library search as there are
  lots of branches all over acquisitions with different meaning.
- Add the shipment date to the results list table
- Change label ISBN/EAN/ISSN to not include EAN for MARC21
  installations

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Merge branch 'new/bug8854'