Koha/t/db_dependent/Acquisition
Galen Charlton f1aa43b75f 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>
2013-11-19 16:12:31 +00:00
..
close_reopen_basket.t Bug 5336: (follow-up) use understandable codes rather than magic numbers for orderstatus 2013-10-22 13:29:23 +00:00
GetOrdersByBiblionumber.t Bug 10575 : GetOrdersByBiblionumber.t needs a database transaction 2013-07-15 16:20:53 +00:00
Invoices.t bug 8854: fix some invoice search filters 2013-11-19 16:12:31 +00:00
OrderFromSubscription.t Bug 7688: (follow-up) update test cases to reflect change in NewSubscription() 2013-10-30 02:27:20 +00:00
TransferOrder.t Bug 5349: Use DB transaction/rollback in unit tests 2013-09-08 22:38:28 +00:00