Bug 12185 - Remove extra "f" from parcel.tt

There is a typoed "f" outside of the HTML on line 279 of
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
This patch removes that extra "f".

To test:
It should be sufficient to look at line 279 before and after the
patch has been applied.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9063: rename num_biblios to num_records in addorderiso2709.{pl,tt}

Bug 2060 renames columns num_biblios with num_records in the
import_batches table.  The addorderiso2709 files had not been fixed.

Test plan:
Add an order from a staged file to a basket and verify the "# Bibs"
columns is correctly filled. Before the patch, the column was empty.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12161: fix regression on serials receiving

Serial receiving was broken when "create an item record when receiving
this serial" is used for the subscription.  This bug was introduced by
the patch for bug 12138.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12163 - fix adding new quotes

Something changed somewhere (maybe a new jQuery or datatables version)
and the javascript that redrew the table row after a new quote was saved
stopped working. This fixes the call to the datatables function so that
it matches the API.

Note that although the new quote didn't appear to be added, reloading
the page shows that it had been.

To test:
* Go and add a quote.
* Note that when you press enter after finishing the quote, the line
  stops being an editor, and becomes just a display, like it should.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8375: (follow-up) adjust StrWidth to account for TTF fonts

This patch fixes an issue caught by the test case where StrWidth()
based its calculations on the internal Adobe font rather than a
TrueType font in use.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8375: (follow-up) adjust another test case for change in fonts

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8375: (follow-up) final adjustment to t/Creators.t

This patch adjusts the test so that it can pass successfully
without a valid context (in which case C4::Creators::PDF defaults
to the built-in fonts) or with one (in which case it uses the
TrueType fonts).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11433: (code cleanup) remove unused 'attachbasket' op value in basket.pl

This patch cleans code in basket.pl

In basket.pl, some code is supposed to be executed if
$op eq 'attachbasket'. But it is never the case
(grep attachbasket * -r), so this condition can be removed.

No functional change expected.

Regression test only :
* Make a complete acquisition process, from the creation of a basket
 to the closure of a basketgroup, and check everything is OK
* On a basket page, try to change the basketgroup it belongs to, and
  check everything is OK
* On a basketgroup page, try to edit the content of a basketgroup (put
  a new basket in it, change the deliverybranch...), and check everything
  is OK
* On a basketgroup page, try to reopen a closed basketgroup, and close an
  open basketgroup, and check everything is OK

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12212: fix error that prevented sysprefs.sql from loading

The line for inserting AggressiveMatchOnISBN didn't have the right
number of columns.

Test Plan:
1) Attempt to run the web installer OR try to import the sysprefs.sql
into your db
2) Apply this patch
3) Try again, no errors should be reported this time

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9048 - fix quote editor under Plack

The ajax responder for the quote editor was using the wrong error codes.
These have been fixed. Also, a small fixup to get rid of some annoying
warnings.

To test:
* Under plack,
* Add/edit/delete a quote.
* Make sure that things don't crash.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12198: remove unnecessary call to GetMemberIssuesAndFines from guarantor search

The script members/guarantor_search.pl made the following call:
my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowerid'});

Not only does this call always fail because borrowerid is not a valid
key, but the results are never even used in the template!

Test Plan:
1) Apply this patch
2) Verify the gurantor search works as before,
   No changes in behavior should be noted

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12198: (code cleanup) remove unused variables, tidy code

To test:

[1] Perform searches for guarantors and verify that there
    are no regressions.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12198: (follow-up) fix warning when opening guarantor search form

To test:

[1] Verify that act of running a guarantor search does not result in
    the following warning message in the Apache log:

"guarantor_search.pl: Use of uninitialized value $member in string ne
 at guarantor_search.pl line 63"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12196 - Remove unused jquery.qtip.js plugin

The qTip jQuery plugin is not longer used anywhere in Koha. This patch
removes it.

To test, apply the patch and search the Koha source for references to
the plugin. There should be none.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12195 - Remove duplicated plugin jquery.dataTables.min.js

All templates in the staff client now load the DataTables jquery plugin
through a single include file, datatables.inc, which points to a copy of
the plugin in intranet-tmpl/lib/jquery/plugins. This patch removes the
unused copy of the plugin found in intranet-tmpl/prog/en/lib/jquery/plugins.

To test, search the Koha source for references to
jquery.dataTables.min.js. There should be no files which point to the
redundant file.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 4068: ensure accepting a suggestion does not hide the 'pending' tab

Prior to this patch:

1) Moving a suggestion from status 'pending' to 'accepted
   - After saving only tab 'accepted' is shown.
2) Moving a suggestion back from 'accepted' to 'pending'
   - After saving only tab 'pending' is shown.

Test Plan:
1) Verify the bug by taking the actions listed above
2) Apply this patch
3) Verify the bug no longer exists

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It is not very elegant but I have nothing else to suggest.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 4068: (follow-up) use URI::Escape

This allows for suggestions that contain characters such
as the ampersand to have their status changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9723: display time due for hourly loans in the public catalog

Due dates in the OPAC don't display the time items are due, and thus
items which are on hourly loans don't display an accurate due date and
time. This patch corrects this by adding (and using) a new "as_due_date"
option to the KohaDates plugin made possible by Bug 11148.

Thanks to Galen for providing the changes to KohaDates.pm.

To test, enable an hourly loan period for an itemtype in your
collection. View the display of date due on the following pages:

- Patron details (opac-user.pl) - Log into the OPAC as a user who has
  something checked out which circulates by the hour.

- Bibliographic details (opac-detail.pl) - View the details for an item
  which is circulates by the hour and is checked out.

- Course reserves details (opac-course-details.pl) - View the contents
  of a course reserve, one of which should be an item which circulates
  by the hour and is checked out.

Due dates for hourly items should show both date and time and be
formatted correctly. Due dates for non-hourly loans should show only the
date. Test in both prog and Bootstrap themes.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11843: prevent manual history from being overwritten if subscription switched to automatic history

Test plan:
1/ Create a new subscription, with manual history enabled
2/ Edit history by clicking on "Edit history" under Planning tab (add
   some text)
3/ Receive some serials, see that received and missing issues are not
   updated in Summary tab
4/ Edit subscription and disable manual history
5/ Receive some serials, see that received and missing issues are
   updated, but your notes have been kept.
6/ Edit serials and change status from/to missing or not available.
   Check that missing issues are updated correctly.
7/ Edit serials and change status from/to arrived. Check that received
   issues are updated correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11843: (follow-up) fix unit test in t/db_dependent/Serials.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>