Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled

If you have the SpecifyDueDate preference disabled and check something
out as an on-site checkout the due date seems to follow the default
circulation rule rather than restricted the checkout to that day.

Test plan:
0/ Disable SpecifyDueDate and enable OnSiteCheckouts
1/ Check an item out to a patron and check the 'On-site checkout'
checkbox
2/ Verify (screen and DB) that the due date is correct (today 23:59)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13289: document.write breaks DataTables

The document.write in a td seems to brake the page with a new version of
DataTables.

This patch replaces a dirty piece of code with another one (but this one
works...)

Test plan:
Create repeatable holidays and verify the page loads correctly.

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

Works to fix the problem. The code is definitely an improvement.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, fixes critical problem.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12703 - OPAC privacy page still accessible when the feature is turned off

If the OPACPrivacy system preference is turned off it is still possible
to navigate directly to the OPAC privacy page if you know the URL. This
patch adapts the fix for Bug 10595 (OpacTopissue page still
accessible when system preference is turned off) for opac-privacy.pl

Because the OPACPrivacy preference is irrelevant if opacreadinghistory
is not turned on, the patch adds a check for both to determine whether
the page should be accessible.

Log in to the OPAC and test under the following conditions:

 - OPACPrivacy is turned off, opacreadinghistory is turned off. Navigate
   directly to /cgi-bin/koha/opac-privacy.pl. You should get a 404
   error.

 - OPACPrivacy is turned off, opacreadinghistory is turned on. Navigate
   directly to /cgi-bin/koha/opac-privacy.pl. You should get a 404
   error.

 - OPACPrivacy is turned on, opacreadinghistory is turned off. Navigate
   directly to /cgi-bin/koha/opac-privacy.pl. You should get a 404
   error.

 - OPACPrivacy is turned on, opacreadinghistory is turned on. A link to
   both "your reading history" and "your privacy" should appear in the
   left-hand sidebar menu. Both pages should work.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and qa script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12701 - OPAC reading history still accessible by URL if turned OFF

If the opacreadinghistory system preference is turned off it is still
possible to navigate directly to the OPAC reading history page if you
know the URL. This patch adapts the fix for Bug 10595 (OpacTopissue page
still accessible when system preference is turned off) for
opac-readingrecord.pl

To test, log in to the OPAC and test the following conditions:

- With opacreadinghistory, navigating directly to
  /cgi-bin/koha/opac-readingrecord.pl should trigger a 404 error.

- With opacreadinghistory turned on there should be a working link to
  "your reading history" in the left-hand sidebar menu.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and passes tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13261 - Better check in message for patrons with indefinite restricition

This patch adds a better check in message for patrons with indefinite restriction.

To test:
Check out an item to a patron.
Add a manual restriction without expiry date to that patron.
Check in the item.

Without patch, the checkin message reads:
Reminder: Patron was earlier restricted until 9999-12-31

Apply patch and repeat steps above.
The message should now read:
Reminder: Patron has a restriction (no expiry date)

NOTE: Changed wording at two places following Owen's  suggestion.  New: "Patron
has an indefinite restriction"

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Thanks Marc for catching this case. I was thinking like you that the wording
sounded strange while playing with bug 13242. Merge the original patch and the
followup, containing a better wording, thanks to Owen comment.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13055 - Show budget name when editing it

This patch adds the budget name to the page heading when editing a
budget. The patch also similarly corrects the page title during edit
operations and fixes some inconsistency in the breadcrumbs.

To test, edit an existing budget (Adminitration -> Budgets) and confirm
that page title, breadcrumbs, and heading look correct.

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Nice improvement, works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12505 - Acq claim: Show error message when no order is selected

If no order is selected on the acq claim page when clicking
'Claim order' an ugly perl error message is displayed.

This patch corrects the behaviour to display a human readable
'No order selected'
instead.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reworded commit message to reflect what the patch achieves.
Works as described and passes tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12505 - Variable aqorders.listprice in acq claim notice doesn't work

Modified:

C4/Letters.pm               - remove aqbooksellers.* from SELECT statement

In Letters - SendAlerts subrotine, is safe to remove aqbooksellers.* from SELECT statement
for type=claimacquisition or claimissues. Aqbooksellers is passed to GetPreparedLetter subrotine in tables variable.

Testing:

I Apply the patch

Select Tools -> Notices and slips;
Edit ACQCLAIM;
Add :
<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>>  <<aqbooksellers.listprice>> each) has not been received.</order>
Save modifications;
Create a vendor (Acquisition module);
Create an order (Acquisition module);
Click Acquisitions -> Late orders;
Select the order created;
Click Claim order button;
Valide <<aqorders.listprice>>;
Valide <<aqbooksellers.listprice>>.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. It's now possible to output the actual price
in the claim notice.

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