Bug 8004 - Items on Hold Lose Transfer After Being Scanned Twice

When a hold is placed on an item where the pickup location is
different than the holding library, Koha initiates a branch
transfer for that item to fill that hold when items is run through
the returns system.

If the item is then run through returns a second time, the system is
supposed to close that transfer as a 'wrongtransfer', and open a new
transfer with the same from and to branches as the original.

The problem is that the original transfer is closed, but the new
transfer is not created. This is because at some point, someone
replaced the template variable WrongTransfer, which had previously
contained the branchcode for the library to transfer to, with the
full name of the library instead ( I assume to make a look nicer ).

Solved by removing the line that was changing the variable contents
from the branchcode to the branch name, and adding a new TT filter,
KohaBranchName that functions in the same way as KohaDates, except
it takes a branchcode and returns the branch name for the given
branchcode.

The consequence of this, is the the name of the library is passed to updateWrongTransfer instead of the branchcode, causing the failure.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7411: Remove diacritics from generated userid

Patch introduces a new module Text::Unaccent.

To test:
1) Add a new patron with diacritics in surname and first name, leave userid empty.
2) Save user and check the created userid has only the base characters and
diacritics have been removed correctly.
3) Create another user with the same surname and first name, check userid
is generated correctly.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8092: Cheer up Jenkins on loading Cache modules

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Merge remote-tracking branch 'origin/new/bug_8092'
Bug 8171 - Improper escaping of quotes during z39.50 queries leads to broken html

Implementing fix as suggested by Chris Cormack:

http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8171#c4

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7941 : Fix version numbers in modules

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7570 - Add Item availability status to cart.

    Added Item availability status to cart(Location table cell).

Changes:
-opac/opac-basket.pl:
Added code to show In transmit status and modified @items to call "GetItemsInfo" instead of "GetItemsLocationInfo" to get accurate avalibility status.
-koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt:
Added code for showing availibility staus in opac-basket page and in  "More details" link.

Test Cases:
-Add records to your cart with different cases like 1 record with  different Item status(Lost,Avaliable,Withdrawn,etc).
-Click on your cart and see the results in a new window.
-Click on "More details" link and check the results.

Signed-off-by: Michael Davis <m.r.davis@cranfield.ac.uk>
[PATCH] [SIGNED-OFF] bug 7570: add a space to the table header

Add a space to separate Location from (Status)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Typo fix, all ok.
Bug 7444: Update circ/circulation.pl to use KohaDates TT Plugin

Removes all date formatting done in circ/circulation, and sets any/all date
outputs to iso format.  The formatting of dates is now handled in the template
using the KohaDates plugin.

This allows use to remove a dependency on C4/Dates.pm from the script.

This patch also removes the usage of C4/Overdues/CheckBorrowerDebarred.  Since
borrowers.debarred is returned by GetMemberDetails, it doesn't make sense to
include another module to run another MySQL query just to fetch the date again.

To Test:

1. View the checkout page for a patron with materials checked out today and in days past, as
well as items on reserve.
2. View a patron who is nearing their expiry date
3. Renew a patron
4. Renew a material from the checkout page using the renewal date selector
5. Attempt to checkout a book to a patron that is on hold for someone else
6. Attempt to checkout a book that is currently checked out
7. View a debarred patron

In all cases, any dates displayed should be in syspref format

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7810 - C4/Auth.pm - on plack restart session is undefined

So we shouldn't try to delete it. This produces application error
instead of redirection to login page.

I had similar problems with CGI, especially when session in browser
is still active, and one on filesystem or database is already expired.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Solved the problem when my Plack installation started acting up due to
stale cookies.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7952 - PDF::Reuse under plack writes to console STDOUT instead to browser

Without name option to prFile, PDF::Reuse opens '-' file which is real
console STDOUT on plack so pdf file gets emited to terminal instead of
sending it to browser.

This change creates temporary file using File::Temp, pass it to PDF::Reuse
and then reads it back and prints it out for plack (or CGI) to pick up.

Test secenario:

1. Home › Tools › Patron Card Creator › Manage Card Batches
2. select batch checkbox and click Export
3. select template and click Export
4. click on pdf file to download it

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>