Updating release notes for 3.8.1
Koha 3.8.1 Translation Update
Merge remote-tracking branch 'tamil/3.8.1-translate' into 3.8.x
Bug 7788: [SIGNED-OFF] Remove two unused calls to GetShelf

Removed two unused calls. Initialized $output in downloadshelf. Corrected some confusing indentation in downloadhself too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7788: [SIGNED-OFF] Followup: GetShelf call in addbybiblio script corrected

Patch resolves incorrect call to GetShelf in opac and staff. It was and is harmless, because the singlecategory variable was not really used (the category$x param was ignored in the template). Just a cleanup operation.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bumping debian changelog
Bug 8057 - Error when adding a patron with email address

Caused by code assuming a the variable $err is a hashref
when it is only a hashref if there is an error.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7948 - Printing transfer slip loses barcode field focus

  * Refocus on barcode field after running Dopop()
  * Cleaned up javascript, removed tabs

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
passes t xt
works as advertised.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 3521 - Items table in catalogue/detail.pl and cataloguing/additem.pl is sorted nonsensically

Based on patch submitted by Ian Walls

Items were sorted by branch, then date accessioned, in GetItemsInfo.  While this can be
helpful in some circumstances, more often it is useful for items to be sorted first by
their enumchron (volume/issue, if applicable) then by their copy number.  This patch changes the
sort on GetItemsInfo to branch, enumcrhon, copynumber then date accessioned.

As sorting on copynumber will be incorrect based on standard sorting ( e.g. 1, 10, 2, 20 ),
the copynumber is now padded with leading zeros to correct the sorting ( e.g. 01, 02, 10 20 ).
This function appears to be a standard SQL function and not a mysql-ism. I have verfified
that is available in MySQL, Postgres, and Oracle.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Passed t xt

Item sorts appear to be correct to me based on the rubric of branch, enumchron, copynumber, then date accessioned.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7178 follow-up: Fix check_additem when UniqueItemFields is empty

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7178 follow-up: Do not fill items table with "(undefined)"

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8135 : Fix installer to copy services/ dir

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7112 - Having two prices in 020$c causes basket creation to fail from staged marc import

The root problem here is that the price is being pulled from the MARC record
and is then run through Number::Format::unformat_number. This routine is
really being misused, and should only be used to reverse the effects of
Number::Format on a number string. We are apparently using it to strip
out currency characters and the like.

Number::Format::unformat_number will choke if there is more than one period (.)
in the price field. MARC standards do not limit this field to a single period,
so unless there is only one period, we should skip number unformatting.
Examples of that break unformat_number include '18.95 (U.S.)', and
'$5.99 ($7.75 CAN)', both of which are perfectly valid.

This commit adds the function MungeMarcPrice that will better handle
find a real price value in a given price field. It does a very good
job at finding a price in any currency format, and attempts to find
a price in whichever currency is active before falling back to
the first valid price it can find.

The variable $price may fail to have an actual price, in which case
the price then defaults to '0.00', which would be rarely if ever the
correct price. To combat this, I have added highlighting to any
price in the Order Details table that begins with 0 ( i.e. '0.00' ).

Also, fixed the incomplete table footer, adding a new td with a
span of 3 to fill in the nonexistant cells.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8124 - Hide option to download results of items with no checkouts report

We should not show disabled controls for features which don't work.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 5795 [SIGNED-OFF] - Missing ReservesControlBranch system pref in database installer

sysprefs.sql file was missing ReservesControlBranch.

To test:
1) Create a new installation and check sysprefs.sql loads correctly.
2) Check ReservesControlBranch shows up correctly in the sys pref editor.
3) Check sys pref can be edited and new value saves correctly.

Signed-off-by: Marc Veron <veron@veron.ch>

- Line is added at the end of installer/data/mysql/sysprefs.sql
- Tested Line diretly in MySQL with a systempreferences table where variable 'ReservesControlBranch' was missing. Data inserted correctly.
- Syspref shows up in Staff client

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

- Fixed merge conflict

Conflicts:

	installer/data/mysql/sysprefs.sql

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

- Tidied for 3.8.x
Bug 5795 Update the database as follow-up If sys pref

ReservesControlBranch has null then update the table to
insert a PatronLibrary as value

To Test:
1) Go to mysql use koha database
2) select * from systempreferences where variable = 'ReservesControlBranch'; Check if value set to ItemHomeLibrary.
+-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+
| variable              | value           | options                       | explanation                                     | type   |
+-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+
| ReservesControlBranch | PatronLibrary   | ItemHomeLibrary|PatronLibrary | Branch checked for members reservations rights. | Choice |
+-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Conflicts:

	installer/data/mysql/updatedatabase.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Fixed for 3.8.x
Bug 5795 : Updating version number
Bug 8040: bad name in acquisitions-menu

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8107 - Disabled buttons not distinguishable from enabled buttons

Add a "greyed-out" style for disabled buttons.

Having looked through the templates for examples of usage of this
I'm not convinced that we should really be showing disabled buttons.
I think in general it would be better to hide or show a button
based on whether the action is available.

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

I agree, I think hiding or showing is better, but this patch is
harmless enough, until we want to go fixing our usage

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8080 - login and password is pre-filled by the browser when creating a new patron

When creating a new patron, if you have chosen to let your browser remember your
login and password for you, the login and password fields will be pre-filled with
them, leading to a systematic error "the passwords entered do not match" since
the second password field was not filled. These fields should be blank.

Add the directive autocomplete="off" to the memberentry form tags.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
passes t xt
enhances usability of password forms, gets my signoff.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>