Commit graph

66 commits

Author SHA1 Message Date
d8dc86bc4b Bug 19280: Pass a Koha::Patron to CanBookBeIssued
We need to make subroutine from C4 use more Koha::Object objects
Seeing bug 19276, starting here is a good start.

Test plan:
The tests should still pass.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-01-09 17:23:15 -03:00
bc0012de2e Bug 17989: Final changes
[1] The template sco/printslip.tt is in the regular modules directory.
Should not be prefixed with a slash.

Test plan:
[1] Try to find another occurrence just like the one corrected in
    sco/printslip.pl where an absolute path is passed to gettemplate or
    get_template_and_user. I already tried several regex variations
    while git grepping template_name, but you may still find one..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Removed the changes for svc/members/search. Not needed.
Commit message adjusted accordingly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-11-01 13:10:18 -03:00
Aleisha Amohia
3c31e6e795 Bug 12691: Use Koha.Preference in Self-Checkout
For calls to SCOUserJS, SCOUserCSS, OPACUserCSS, AllowSelfCheckReturns,
OpacFavicon, ShowPatronImageInWebBasedSelfCheck, SelfCheckoutByLogin

Sponsored-by: Catalyst IT

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 12691: [FOLLOW-UP] Follow-up patch

This patch fixes merge conflicts and fixes the problems in Comment 7

QA tools complain about missing bracket, will be fixed in next followup
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 12691: [FOLLOW-UP] Missing bracket

Patch adds bracket to template file (Comment 16)

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Bug 12691: [FOLLOW-UP] Fixing some logic

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Patches have been squashed for readability and 1 removal occurrence of
display_patron_image has been reintroduced.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-09-07 14:03:45 -03:00
64a0aa541e Bug 19048: (bug 17829 follow-up) Fix regression in self checkout
$patronid is not necessarily set or does not match a valid cardnumber.
These cases must be taken into account to avoid the script to crash and
raise the following error:
Can't call method "unblessed" on an undefined value at
(...)/koha/opac/sco/sco-main.pl line 117

Test plan:
Hit sco/sco-main.pl and confirm that the error is gone with this patch
applied

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-08-08 09:20:50 -03:00
2b90ea2cb0 Bug 17829: Move GetMember to Koha::Patron
GetMember returned a patron given a borrowernumber, cardnumber or
userid.
All of these 3 attributes are defined as a unique key at the DB level
and so we can use Koha::Patrons->find to replace this subroutine.
Additionaly GetMember set category_type and description.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-07-10 13:14:19 -03:00
57f28f9ee4 Bug 7550: SCO - Restrict access of patron's image
With this patch if SelfCheckoutByLogin is set to 'username and
password', only the logged in user will be able to see the image linked
to his/her logged in account.
If set to "barcode" we generate a token but it can be easily generated.
You should add a warning in the about page if
SelfCheckoutByLogin="barcode" and ShowPatronImageInWebBasedSelfCheck="Show".

How I tested:
- Go to SCO
- Log - Enable self checkout, go to [Your
  Server]//cgi-bin/koha/sco/sco-main.pl
- Log in with a user 'A' who has a patron image
- Copy the address of the patron image into an other browser window
- Change the borrowernumber to on of an other user 'B' having a patron
  image
- Verify that the patron image is NOT displayed

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-05-08 09:00:26 -04:00
d28d5a280d Bug 18349: If a confirmation is required, consider as blocker
Only RENEW_ISSUE should not be considered as blocker, others should.
Note that this code is not robust and the whole script as well as the
return of CanBookBeIssued should be rewrittent completely.
We need a small patch to easy backport to stable releases

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-04-12 18:47:02 +00:00
6b75e5b478 Bug 18349: $borrower is a hashref
I guess this code was never called before...

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-04-12 18:47:01 +00:00
85bd15a83f Bug 18349: SCO - Do not trust the confirmed flag
The "confirmed" flag is used to know if that user confirmed a situation
that needs a confirmation.
But if the issue/renew is impossible the CanBookBeIssued and the
'impossible flags' should be checked.

Otherwise a patron can checkout and renew bypassing the circulation
rules (Understand 'no limit' here...)

Test plan:
Want to renew?
Checkin $barcode, then
/cgi-bin/koha/sco/sco-main.pl?patronid=$cardnumber&barcode=$barcode&confirmed=1&op=checkout

Want to bypass the checkin?
Same url...

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-04-12 18:47:01 +00:00
0509d427b9 Bug 17560: Improve strenght of hold existence test
This patch is a QA follow-up to fix several issues:
- 1 call to GetReserveFee was wrong in ModReserveFill
- Update DB entry was wrong and insufficient
- Add robustness to the tests in sco-main

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-31 12:06:05 +00:00
164db2833e Bug 17560: Add a message when a patron checking in using the self checkout
Sponsored-by: Cheshire Libraries

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-31 12:06:04 +00:00
b59df2bce7 Bug 17578: GetMemberDetails - Remove GetMemberDetails
All the values different from the ones GetMember returned has been
managed outside of GetMemberDetails.
It looks safe to replace all the occurrences of GetMemberDetails with
GetMember.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-12-16 13:12:44 +00:00
8dce1cde3a Bug 16873: Improve renewal error messages on self check
When a patron is not allowed to renew from the self check module, the
only message displayed is "No renewals allowed".
It would be nicer to let him/her know that the renewal is not allowed
because it's a on-site checkout or automatic renewal.

To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get
the renewal error.

Test plan:
0/ Switch off AllowSelfCheckReturns
1/ check out an item and tick "auto renewal"
2/ Go on the self check module
=> auto renewal message is displayed
3/ check out an item and tick "on-site checkout"
4/ Go on the self check module
=> on-site checkout message is displayed
5/ check out an item without ticking any checkboxes (regular checkout)
Renew it to reach the max renew allowed
6/ Go on the self check module
=> regular checkout message is displayed
7/ Switch on AllowSelfCheckReturns and repeat previous steps
=> "Return this item" button is displayed in addition of the renewal
error message

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-29 17:44:09 +00:00
ed2c2213a7 Bug 15131: Make SCO use the new syspref.
This patch just makes SCO use the new syspref (AllowItemsOnHoldCheckoutSCO)
instead of the old one, thus making it configurable, separate from the
non-SCO syspref.

Sponsored-by: NEKLS

Signed-off-by: George <george@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 17:27:07 +00:00
649956b216 Bug 17386: Simplify code
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-10 14:08:20 +00:00
Marc Véron
d63f02a8c4 Bug 17386: Add opac notes for patron to self checkout screen
Display patron messages from OPAC summary page on SCO screen as well.

To test:
- Make sure you have patrons with and without OPAC note and OPAC messages
- Log in to OPAC and go to patrons 'your summary' page to display note
  and messages
- Apply patch
- Refresh patrons detail page. Verify that it looks the same as before
- Go to SCO
- Log in as such patron
- Verify that note and messages appear the same as on OPAC summary page

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-10 14:08:20 +00:00
386f7ae9af Bug 17299: Display date due correctly on SCO
Unless it's an hourly loan, date due should not display the time part
(23:59).
Because of bad code in GetPendingIssues, date_due is replaced with a
DateTime object and is copied into date_due_sql.
We need to use this date_due_sql to correctly display the date due in
the sco module.

Test plan:
1/ Enable WebBasedSelfCheck syspref
2/ Check out an item to User A -- Do not use an hourly loan.
3/ Log in to Koha self check ( {OPAC URL}/cgi-bin/koha/sco/sco-main.pl).
4/ Enter User A's cardnumber.
Without this patch, checkouts are
   MM/DD/YYYY 12:00 AM (Timeformat: 12 hour)
or MM/DD/YYYY 00:00    (Timeformat: 24H)
With this patch applied, only the date is displayed

Followed test plan, works as expected.
Signed-off-by: Marc <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-15 13:22:34 +00:00
e476be5568 Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page
Currently if not logged in when browsing to
http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl
You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not
loaded. This page passes through a parameter to the template to indicate
this is an SCO login and appropriate CSS and JS should be loaded.

Additionally this patch ensure that when loggin in using the form you
are redirected to the sco-main.pl instead of the patron account page for
the user.

To test:
1 - Verify that normal login works on both staff and opac
2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is
set to "Don't allow"
3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are
present on SCO log in page with AutoSelfCheck disabled
4 - Verify that a logged in opac user without permissions cannot access
the self-checkout module
5 - Verify that AutoSelfCheckAllowed and associated system preferences
function as expected
6 - Verify the AutoSelfCheck user is logged out if they attempt to visit
another page

Followed test plan.
If I go to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl, CSS and JS trigger already on
the login form, I suppose that is intended.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
2016-04-22 00:57:44 +00:00
545b64f869 Bug 15635: Koha::Patron::Images - Remove GetPatronImage
To retrieve a patron image, we can call Koha::Patron::Images->find or
Koha::Patrons->find->image
Both will return a Koha::Patron::Image object.

Test plan:
1/ From the patron/member module, open all tabs on the left (Checkouts,
detail, fines, etc.)
The image should be correctly displayed.
2/ At the OPAC, on the patron details page (opac-memberentry.pl) the
image should be displayed as well.
3/ Same on the sco module.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-03-04 12:54:15 +00:00
1538e9ecf4 Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search
Most part of the code here is unnecessary complex. We should selected
the currency if it is selected, that's all :)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-03 20:39:01 +00:00
995e27b373 Bug 14298: Use the new permission in the sco scripts
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Note without this patch, you won't be able to access the SCO side.
So don't panic if you cant use SCO with just the first patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-09-25 11:15:48 -03:00
Jonathan Druart
a6c9bd0eb5 Bug 9978: Replace license header with the correct license (GPLv3+)
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

http://bugs.koha-community.org/show_bug.cgi?id=9987

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-20 09:59:38 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
afd2418d73 Bug 11349: Change .tmpl -> .tt in scripts using templates
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.

This patch changes the occurences of '.tmpl' in favour of '.tt'.

To test:
- Apply the patch
- Install koha, and verify that every page can be accesed

Regards
To+

P.S. a followup will remove the glue code.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-17 11:05:49 -03:00
Bernardo Gonzalez Kriegel
c53520d58d Bug 12062: Follow up to fix more untraslatable cases
This patch modifies staff printslip.tt to take into account
caller. Also fixes similar problem on opac printslip.tt

To test:
staff
1. Print hold transfer slip
2. Print transfer slip
3. Print member slip
opac
4. Print self checkout slip

5. Update translation files, check new strings are present

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:32:08 -03:00
Marc Véron
1db56c834b Bug 11773: fix crash in sco-main.pl if no active currency is set
If no currency is defined as active and a patron with debts tries to
check out in welf checkout moduel, sco-main.pl crashes with:

Software error:
Can't use an undefined value as a HASH reference at /usr/share/kohaclone/opac/sco/sco-main.pl line 190.

This patch tests for active currency and simply does not display a
currency symbol if appropriate.

Test plan:

1) Make sure you have a patron with debts and no currency defined as
   active.  (Home › Administration › Currencies & Exchange rates
   › Currencies )
2) Go to Self checkout module and try to checkout an item to this patron
   Result: Crash with error message "Can't use an undefined value as a
   HASH..."
3) Apply patch
4) Reload and try to checkout again
   Expected result: Message "You owe the library..." without currency
   symbol
5) Define a currency as active and try to checkout again
   Expected result: Message "You owe..." with currency symbol

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-18 21:03:30 +00:00
Galen Charlton
7b165794cd Bug 10016: force zero browser-side caching of SCO pages
This patch makes the web-based self-check module pages
specify that no browser (or proxy caching) occur at all.
This prevents a security issue where letting the SCO session time out,
then hitting the back button allowed one to view the previous
patron's session.

This patch adds an optional fifth parameter to output_with_http_headers(),
and output_html_with_http_headers(), a hashref for miscellaneous
options.  One key is defined at the moment: force_no_caching, which if
if present and set to a true value, sets HTTP headers to specify no
browser caching of the page at all.

To test:

[1] Start a web-based self-check session and optionally perform
    some transactions.
[2] Allow the session to time out (it may be helpful to set
    SelfCheckTimeout to a low value such as 10 seconds).
[3] Hit the back button.  You should not see the previous patron's
    self-check session.
[4] Verify that prove -v t/Output.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 18:05:12 +00:00
09b8ce2a5f Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable patronimages
4) Verify patron images are still displaying correctly
5) Test deleting a patron image
6) Test adding a patron image from moremember.pl
7) Test adding a patron image from tools/picture-upload.pl

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:08:02 +00:00
Jonathan Druart
a469663d7b Bug 9108: Followup: send the dateformat value from C4::Auth
- the dateformat value is send to all templates (from
  C4::Auth::get_template_and_user)
- remove all assignment of dateformat in all .pl files
- the DHTMLcalendar_dateformat variable is unused

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts:
 - opac/sco/sco-main.pl
 - reports/acquisitions_stats.pl
 - tools/cleanborrowers.pl

All tests pass, perlcritic problems appeared in some files
before and after these patches were applied.

Checked sorting in following pages:
- acqui/addorderiso2709.tt - list of staged imports in acq
- acqui/histsearch.tt - sorting of dates in acq search result list
- acqui/invoices.tt - billing date in list of invoices in acq
- acqui/lateorders.tt - list of late orders in acq
- acqui/ordered.tt - ordered titles and estimated costs for a fund
- acqui/parcels.tt - receive shipment page
- acqui/spent.tt - received titles and actual costs for a fund
...
- serials-search.tt - subscription search result list
...
- opac/sco/sco-main.tt - due dates in list of checked out items
- reports/acquisitions-stats.tt - date searches, display of dates
- tools/cleanborrowers.tt
- tools.holidays.tt - different views of dates library is closed,
  adding dates

Checked dates display according to system preference everywhere and
searching, entering dates etc. still worked as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-17 21:59:30 -05:00
6bae88f43d Bug 9009 - Add separate user js and css for SCO module
Add system preferences SCOUserCSS and SCOUserJS to define separate CSS and JavaScript for the Self Checkout Module.

Test plan:
1) Apply patch
2) Run updatedatabase.pl
3) Add something arbitrary to the new sysprefs SCOUserCSS and SCOUserJS ( such as TestCSS and TestJS ).
4) Load the SCO module in a browser, and view the HTML, verify the CSS and JS values in the system preferences have been included.

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

I tested with an alert('hello') as JavaScript and some background-color for the CSS. Worked as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-27 10:05:28 -05:00
e1c621c230 Bug 8955 - Self checkout should degrade gracefully with JavaScript turned off
Several changes in this patch, the largest of which is that the
renew/return dialogs no longer require JavaScript in order to properly
alter and submit the form. Instead each button uses a separate form.

To test, log in to self checkout and submit a barcode which is checked
out and can be renewd, and a barcode which is checked out but has
reached the checkout limit. On the resulting dialogs each button
should function properly.

Also changed: I removed some useless JavaScript processing related
to a bogus "valid_session" variable which was unused.

Similarly removed is template logic based on a "timedout" variable which
was not set by the script. Note that the script contains NO server-
side handling of timeout. Timeout is dependent on JavaScript.

To test these changes, confirm that with JavaScript enabled you are
automatically logged out after the time specified in the SelfCheckTimeout
preference.

Other minor changes: Terminology and capitalization corrections,
minor style tweaks.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-22 16:33:12 -05:00
Paul Poulain
17cd17531f Bug 8033 follow-up removing tabs in indentation
Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-13 17:49:08 -05:00
Elliott Davis
05c47d5040 Bug 8033: This patch adds print slips to self checkout.
To Test:

Sign in to self checkout.
Enter a barcode and click submit.
Click the finish button
You should be prompted with a message asking if you would like a receipt.
If you click OK you should be taken to the page with the receipt.
If you click Cancel you should not see the reciept and you should be logged out.

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

Added copyright to print slip for SCO

Modified POD and copyright.  Also perltidied

updated print slip option to show on the click of the finish button instead of the submit button

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-13 17:48:09 -05:00
Marc Veron
29891f38f9 Bug 8518 - Self checkout does not display debt amount if syspref AllowFineOverride is set to allow
If the patron has depts that prevent issuing and the system preference 'AllowFineOverride' is set to 'allow', the amount is not displayed in the user message.

Additionally, patch adds currency symbol to amount.

Test plan:
Do self checkout with patron who has debts that are over the limit.
Test with and without preference 'AllowFineOverride' set.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-01 17:39:55 +02:00
492058d3d5 Bug 4330 : Adding missing license statement
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-28 17:53:59 +02:00
Julian Maurice
e1148ec52a Bug 7743: Update sco/sco-main.pl to use KohaDates TT plugin
Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
2012-03-26 16:22:43 +02:00
9ffa73534b Bug 7631 - Self checkout renewal fails because of reference to non-existent subroutine in sco-main.pl
Changing "CanBookBeIssuedCheckout" to "CanBookBeIssued"

To test, try to renew an item which has no renewals left. Before the patch
you'll get an error:

Undefined subroutine &main::CanBookBeIssuedCheckout called at /opac/sco/sco-main.pl line 135.

After the patch you'll get the correct message about having no renewals left.
Other tests: checking out a barcode which doesn't exist, checking out an
item which is on hold for another patron.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-08 18:10:52 +01:00
Srdjan Jankovic
2041f2c973 bug_7090: AllowItemsOnHandCheckout syspref
Observe AllowItemsOnHandCheckout syspref when using SIP self checkout

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
To test:
* place an item on hold for patron A
* attempt to circulate that item to patron B (via SIP/selfcheck)
	syspref off: item should not circulate to patron B
	Syspref On: item should circulate to patron B

Both conditions passed in our testing.
Also verified that normal staff client behavior regarding this situation was preserved. It was.
2012-02-10 19:28:25 +01:00
Chris Cormack
40bd14e0ea Bug 4330: Missing License Statement
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2011-11-24 14:15:57 +01:00
Ian Walls
8d7608cd64 Bug 5995 Follow up: variable scope in koha/sco/sco-main.pl
The patronid value (cardnumber) set by checkpw in the case of SelfCheckoutByLogin
was improperly scoped with 'my' inside a conditional.  The changes followup to 5995
made this more apparent, causing logins to fail.

Also added "parts copyright" statement to the script, since ByWater Solutions did make some
significant contributions to the operations of the page

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-22 06:32:03 +13:00
Ian Walls
b2a233f480 Bug 5578: Self checkout by Login enhancement
Enables the library to choose whether to have patrons scan their barcodes for self checkout, or login
with username and password.  Uses 'checkpw' for compatibility with LDAP authentication.

Also introduces a few new system preferences to make Self Checkout more secure and manageable:

  SelfCheckTimeOut:      the number of seconds before the self-checkout login times out for a patron
  AllowSelfCheckReturns: indicate whether or not patrons can return materials via self-checkout
  SelfCheckHelpMessage:  user-configurable HTML to show specific text on the Help page.

Thank you to Marlboro College in Marlboro, VT for sponsoring and testing this development!

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 15:18:40 +13:00
Lars Wirzenius
873a3cb9bc Fix FSF address in directory opac/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:54 -04:00
13ab69ae08 bug 4122: make WebBasedSelfCheck functional
The WebBasedSelfCheck preference is now functional - if a user
tries to use /cgi-bin/koha/sco/sco-main.pl if the preference
is not on, they get redirected to the OPAC home page.

Also, the patron image web service now returns HTTP 403 (forbidden) unless
both WebBasedSelfCheck and ShowPatronImageInWebBasedSelfCheck are on.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 08:41:50 -05:00
372ebb8bdd set koha_login_context in order to get auto-login for SCO working
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 09:01:25 -05:00
Jane Wagner
f52c54eb35 Bug 3738 Automate login to web-based self-check system
Some small, single-branch corporate and special libraries use unattended self-checkout stations, and would like to automate the staff login, so that just going to the sco/sco-main.pl URL would bring the self-check up ready for patron use.  This patch create three sysprefs, AutoSelfCheckAllowed, and AutoSelfCheckID/AutoSelfCheckPass. If the site wants to allow automated login, staff would then need to create the selfcheck user record and enter that login ID and password into the sysprefs.  The kohaclone/opac/sco/sco-main.pl script has been modified to check these sysprefs and pass values (if present and allowed) into the self-check URL.  The URL then bypasses the staff login page and comes up ready for checkout, waiting for the first patron barcode.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 08:43:07 -05:00
2e73ac94e4 bug 3436: tweak cache settings for patron images
Per suggestion by Joe Atzberger.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-16 07:45:31 -04:00
Galen Charlton
069864d3a2 bug 3436: improve error messages in self-check
Improved the error messages displayed to users
by web-based self-checkout when a problem with
a loan occurs.

This changed was sponsored by the Plano Independent
School District.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-16 07:36:37 -04:00
Galen Charlton
7c7e1dc41d bug 3436: enhance sorting of loans (self-check)
[1] Change the default sort order of checked out
    items to have the most recent loans displayed
    first.

[2] Add the ability (via jQuery tablesorter) for
    the user to sort the list of loans.

Also fixed the formatting of the due date.

This change was sponsored by the Plano Independent School
District.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-16 07:36:35 -04:00
Galen Charlton
121a4ca0d1 bug 3436: add patron images to web self-check
Adds a new system preference, ShowPatronImageInWebBasedSelfCheck;
if this preference is ON, a patron's image is displayed
if available when using web-based self-check.

Note: a patch for updatedatabase.pl will be made when this
change is ready to push.

This change is sponsored by the Plano Independent School
District.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-16 07:36:31 -04:00
Galen Charlton
adaf1d9195 fix minor warning issues in SCO
* test for NO_MORE_RENEWALS now does expect
  that hash key will always exist
* removed unconditional warn

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-03 14:37:29 -05:00