Bug 9377 - itemtype in duplicate biblio search

In C4::Search::FindDuplicate, when biblio has no ISBN, the duplicate search adds :
$query .= " and itemtype=$result->{itemtype}".
This is wrong when itemtype is defined in items.

This patch simply removes the itemtype from dublicate search.

Test plan :
- Go to a biblio details page
- Click on "Edit as new (duplicate)"
- If ISBN is defined, remove it
- Click on save
=> a duplicate is detected
- Change biblio item type and save
=> a duplicate is detected
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8054 - double clicking can cause duplicate payments/fines

Uses preventDoubleForSubmit() to prevent double form submissions in the fines module.

To test:

Create a manual invoice/fine
Create some manual fines, click save like mad - you should get only one fine (without, you will get several if you click madly enough)

Click Pay fines
Pay some fines, clicking save like mad on each. You should only get one payment. (without, you will get several payments)

Create a manual credit
Create a credit, click save like mad. You should only get one credit. (without you will get several if you click madly enough)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9207 - Improve z39.50 speed slowdowns for sites with many records

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Conflicts:
	installer/data/mysql/updatedatabase.pl

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bumping db version
Bug 9695 - Use alphabet system preference on page used to browse patrons for patron card batches

When adding patrons to a batch for creating patron cards, the template
shows alphabet links for browsing all patrons. This patch converts the
hard-coded alphabet links to use the new alphabet system preference.

To test, go to the patron card creator and create a new batch. Click
"Add items" to pop up the window for browsing for patrons to add to the
batch. You should see a working array of alphabet letters which link to
patron search results.

Signed-off-by: David Cook <dcook@prosentient.com.au>

The patch adds consistency to the interface and works as described.
Signed-off-by: Jonathan Druarth <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
bug 9784: add koha-shell to the koha-common man page

To test:

Build a package from a git checkout with this patch included
once installed, run man koha-common - koha-shell should appear near the bottom.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 4266: Hide Encumbrance and Expenditure in aqbudgets.tt

Encumbrance and Expenditure fields are not taken into account by Koha,
but the data are saved in database.
This patch hide these fields in aqbudgets.tt
To test : check if the 2 fields are hidden when creating a new fund.

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

This could certainly be done in a few different ways both with CSS and
JS, but this is a simple change and can be easily overridden:

$("#budget_encumb,#budget_expend").closest("li").show();

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7596 - System prefs editor JS contains untranslatable English string

There is one stray instance of an untranslatable string in
preferences.js. This patch replaces it with a variable which is now
defined in the preferences template.

To test, open the system preferences editor and change any setting. You
should see the usual "Saved preference <preference name>" message.

To test that error strings are now translatable, run "perl translate
update <lang>" from misc/translator, then check if the affected strings shows
up in the po file.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested both, all ok.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 9765 - Remove unused include file: budgetperiods-admin.inc

budgetperiods-admin.inc doesn't appear to be used anywhere in Koha. This
patch removes it.

To test, confirm that a search for references to budgetperiods-admin.inc
returns no results.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
3.8.11 language updates
Bumping the db version for a release
3.8.11 Release notes
Bug 9341: Problem with UNIMARC authors facets

In UNIMARC installations the authors have a double comma separating the subfield a and the subfield b.

Test plan:

- After applying the patch do a search and check the double comma in authors facets.
- Apply the patch
- Do a new search
- Check if authors facets as a double comma

Sponsored-by: KEEP SOLUTIONS
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Conflicts:
	installer/data/mysql/sysprefs.sql
	installer/data/mysql/updatedatabase.pl

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Conflicts:
	installer/data/mysql/sysprefs.sql

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bump db number
Bug 7018 : need all acq permissions to search

All acquisition module permissions are needed to allow order search (acqui/histsearch.pl).

With this patch any acquisition permission allows to order search.
Many other pages of this module have this behavior.

Test plan :
- Set for a user only one permission in acquisition module (not order_receive)
=> they also need catalogue permission to be able to log in
- Login with this user and try to perform an order search
=> you get access to page
- Set for a user no permission in acquisition module
- Login with this user and try to perform an order search
=> you do not get access to page

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected and passes tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 7875: Change the pending suggestion link in home page so that it directs to pending suggestions

Pending suggestion link from staff client home directs to accepted
suggestions instead of pending suggestions. This patch changes the link
so that it directs to pending suggestions.

To test :
1 - create 2 suggestions, accept 1 of them
2 - click on the link on home page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9748: don't link items in SCO checkout list back to main OPAC

It appears that the conversion from HTML::Template to TT
changed noitemlinks to ISSUE.noitemlinks, hence it is being ignored.

This is a problem for SCO kiosks where all the navigation controls
are hidden. Clicking the link means leaving the SCO module and
not being able to get back.

Test plan:
1) Run SCO module, check for item links
2) Apply patch
3) Run SCO module, note that the items no longer have links

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9802 - add test case to ensure man pages have correct XML

To test:
* run xt/verify-debian-docbook.t and make sure it's all OK
* modify an xml file in debian/docs, try again, make sure it fails

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Running "prove -v xt/verify-debian-docbook.t" loops through all the
  XML files in debian/docs and reports them as being ok.
- Removing a "<" from one of the files makes the test report it as
  an error
- I did not verify that the test actually trips up a package build
  if there is invalid XML.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8378 - <fine> in overdues changed to <<items.fine>>

This patch reintroduces fines in overdue_notices.pl with minimal
changes to exsiting code.

It DOES changes template syntax, it used to be <fine>USD</fine> but
currency was not recalculated and used only to select format, so
now we are using active system currency because values are in it
anyway.

Example notify template:

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>,
Barcode: <<items.barcode>> Fine: <<items.fine>> </item>

If your active currency doesn't have valid ISO code this code will
fallback to sprintf with two decimal digits, and you can insert
currency symbol in template itself (currency field is not editable
through web interface, so this fallback might be useful for existing
installations).

Test scenario:
1. configure fine amount under "Circulation and fines rules"
   for patron category and item type
2. checkout item with correct type to partron in correct
   category with due date set to yesterday
3. verify that overdue notice uses new <<items.fine>> tag
4. run ./misc/cronjobs/fines.pl to calculate fines
5. run ./misc/cronjobs/overdue_notices.pl -n
   and verify that fine amount is included

Notes: Tested using the default ODUE notice, changing:
<fines>USD</fines>
for
<<items.fine>>

Everything worked as expected with finesmode=production set.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8378 - show all items columns and new items.fine

This allows users to select any columns from items and adds new
items.fine field introduced by previous patch to user interface.

Note: This works as expected. items.fine appears as an option and gets inserted in the notice template as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>