Commit graph

496 commits

Author SHA1 Message Date
Bernardo Gonzalez Kriegel
3209941f3f Bug 9457 - Followup - Ordering branches should be case independent (2)
This follow up reinstates or add check for undef returned
by C4::Context->userenv, only where previous patch touch
code.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-20 15:36:19 -04:00
Bernardo Gonzalez Kriegel
2d9f5fc69e Bug 9457: [ENH] Ordering branches should be case independent (2)
This patch replace use of CGI::scroll_list() to show list of branches.

In two files, marc21_linking_section.pl and unimarc_field_4XX.pl,
the scrolling list is created but not used in the template file,
so the code is removed.

Also minor renaming/normalizing of variables.

To test:
1) Install with some branches, records and patrons

2.1) Select a record, click 'Place hold', select user,
     there is a library pull-down next to 'Pickup at:',
     list is ordered case sensitive
2.2) Go to Reports > Average loan time,
     next to Library is a pull-down,
     list without order
2.3) Go to Reports > Catalog by item type,
     next to 'Select a library' is a pull-down,
     list is ordered case sensitive
2.4) This is tricky, go to Reports home,
     change last part of URL 'reports-home.pl' with
     'manager.pl?report_name=issues_by_borrower_category'
     (can't find a direct link), next to 'Select a library'
     is a library pull-down,
     list without order
2.5) Edit/Add a patron, on section 'Library management'
     there is a library pull-down, case sensitive
2.6) OPAC, as logged user, make a suggestion or hold,
     there is library pull-down, correct order

3) Apply the patch

4.1) Repeat 2.1), correctly ordered list
4.2) Repeat 2.2), correctly ordered list
4.3) Repeat 2.3), correctly ordered list
4.4) Repeat 2.4), correctly ordered list
4.5) This is a bit more work
     There are 3 possible situations to test:
     A) No branches, must show a message that are no
        libraries defined
     B) New patron, must show a correctly ordered
        list of branches, current branch selected
     C) Edit patron, must show a correctly ordered
        list of branches, patron branch selected
4.6) Small changes on variable names, so retest 2.6)

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>
2013-03-20 15:35:58 -04:00
Jonathan Druart
fad1f44d42 Bug 9367: Code optimization: CheckReserves is too often called
This patch rewrites the GetReserveStatus routine in order to take in
parameter the itemnumber and/or the biblionumber.

In some places, the C4::Reserves::CheckReserves routine is called when
we just want to get the status of the reserve. In these cases, the
C4::Reserves::GetReserveStatus is now called.
This routine executes 1 sql query (or 2 max).

Test plan:
Check that there is no regression on the different pages where reserves
are used. The different status will be the same than before applying
this patch.

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>
2013-03-16 11:49:43 -04:00
96b6f39e7a Bug 9586 - Remove $ENV{DEBUG} info from Member Template
Currently, if $ENV{DEBUG} is set (for example to 1), the debug level
will be printed on the Add/Edit Patron pages (memberentrygen.tt) in the
form of: "Debug is on (level 1)".

While many if not most folks might not set $ENV{DEBUG} on a production
system, there is no reason to have this information printing on the
member template(s).

No where else in Koha is there a template that prints $ENV{DEBUG}
information, with the exception of calendar.inc, although that doesn't
activate until at least debug level 2 or 5, so it might be worth holding
on to. It is certainly more complicated than simply printing the debug
level. I don't do development on the calendars, so I'm not going to
address that one.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-07 09:49:10 -05:00
Jared Camins-Esakov
7c0edbc315 Bug 9582: Remove unused code from members/pay.pl
The subroutines writeoff() and get_writeoff_sth() (and the two package
variables $writeoff_sth and $add_writeoff_sth) defined in members/pay.pl
are not used at all.

To test:
1) View members/pay.pl by looking at the record of a patron who has
   at least seven fines/fees and clicking the "Pay fines" tab after
   clicking the "Fines" tab on the left side
2) Write off a single item in the table on members/pay.pl using the
   button labelled "Write off"
3) Pay a single fine by clicking the "Pay" button
4) Pay a portion of a fine by selecting a checkbox on one of the lines
   in the table and clicking the "Pay amount" button
5) Select two lines in the table and click the "Pay selected" button
6) Write off all remaining fines

If all your actions show up in the table on the Account tab, this patch
works.

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>
2013-02-20 08:17:34 -05:00
9d4896eace Bug 9380 - branch not recording right on writeoff
Test Plan:
1) Write off fines as various branches
2) Observe the stats lines include the wrong branchcode
3) Apply patch
4) Repeate step 1
5) Observe the stats lines include the correct branchcode

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Also tested by changing branch and writing off again - all
tests pass.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked individual and complete write off for different branches.
Write offs were always recorded correctly for the logged in branch.
All tests and QA script pas.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-10 10:11:48 -05:00
Adrien Saurat
3c1407c375 Bug 9330: title field empty when duplicating a patron
For a duplicated patron, the "Saluation" information
is now empty by default.

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>
2013-02-01 12:01:59 -05:00
MJ Ray
99e1fa291a Bug 9407: patrons search should match substrings
If a patron lives at 4345 Library Rd, a search on Street Address for
    Library should find it. However, it does not, but a search for 4345
    Library does.  This patch adds a "Search Type" drop-down, defaulting
    to the current behaviour.

    To test:
    1) Search for a patron based on a non-leading part of a field.
    2) Should return no results.
    3) Search again with "Search Type" of "Contains".
    4) Should return the patron.

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>
2013-01-22 18:56:23 -05: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
f2c2be1c20 Bug 9141 - Untranslatable strings on "pay an amount..." page
Moving text of an error message from the script into the
template. To test, submit an amount which is greater
than the amount due. You should see an error message
displayed correctly with a properly-formatted currency
amount.

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

Patch behaves as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-07 20:48:42 -05:00
8fd75227fc Bug 6261 [Revised] Consolidate patron toolbar include files
The staff client has two almost identical include files which
can be consolidated: circ-toolbar.inc and members-toolbar.inc.
This patch marges the slight differences between them and
eliminates circ-toolbar.inc, that being the one which was used
on fewer pages.

In order to accommodate the different "destination" variable
for operations which redirect back either to circ or patrons,
circulation.pl defines "destination" in the template.

Revision corrects a redirect error in setstatus.pl which
predates this patch but which never showed up until now.

To test, perform various operations from the toolbar on at least
two pages: circulation.pl and moremember.pl.

Operations: Edit, add child, duplicate, change password, print (all
options), search to hold, renew, set permissions, delete, update child
to adult, and export checked-in barcodes. In most cases simply
confirming that the link takes you to the right place is enough.

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>
2012-12-27 18:36:42 -05:00
5a0dffcaac Bug 7067 [Follow-up: templates] allow patron self registration via the opac
- Adding simple style to register link on home page
- Adding unique ids to new pages and to blocks containing
  registration links
- Adding better page titles and breadcrumb links to some pages
- Correcting bug which meant incorrect message showed on registration
  page when OPACPatronDetails preferences is turned off
- Passing patron details to opac-memberentry.tt so that patron's
  name can be displayed in breadcrumbs
- Improving display in staff client of patron record updates
  waiting to be approved.
- Adding a sort by name to output of pending patron record updates
- Adding updated JqueryUI library files to include expanded widget
  options.

The changes in this patch require the addition of the jQueryUI
Accordion widget. Other pending patches are seeking to add
enough of the other remaining missing widgets that it seems time
to go ahead and add the rest.

Future submissions which add usage of these widgets will have
to be careful to make changes to Koha's CSS where necessary.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-14 08:08:59 -05:00
92782d3832 Bug 7067 - OPAC Borrower Self Registration
This development will add the ability for a new patron to register
himself or herself. The self-registration will attempt to match this
newly inputted data to any existing patrons and if any possible matches
are found, ask if the patron is sure he or she doesn't already have an
account at the library. A system preference may be set to prevent patron
self-registration if the system detects the possibility that the person
may already have an account.

Once the patron has registered, passing a captcha (or similar
bot-stopper), the patron will then be optionally verified a second time
via email. At this point, the patron will be able to print a temporary
library card (optional by system preference), and will be provided any
details necessary to access electronic resources (this body of text
would be a template in the slips and notices system). At the library's
choice, this new patron would either be set to a temporary patron status
(patron type set via system preference), or a fully-fledged patron
(allow patron type to be determined by age and/or other attributes).
Assuming the library uses temporary patron types for OPAC registrations,
this patron will next enter a queue and would need to physically enter
the library to verify himself and become a fully-fledged patron (most
likely by bringing in physical proof of address, etc.). The librarian
would look up the patron record and modify the patron type. If a
temporary patron has not been verified within a certain time frame
(defined by a system preference), the patron record will be deleted
from the system via a cron job.

For registered patrons, the system will allow each person to also
update his or her personal data via the OPAC. When a patron updates his
or her information, the changes will be entered into a queue to be
verified by a librarian (preventing a patron from inputting obviously
bogus data). The staff client home page will display the number of
patron records with changes awaiting approval. A librarian would then be
able to click through a list of modification requests, and approve or
deny each (with approval and denial alerts being sent to the patron via
the standard messaging system).

NEW SYSTEM PREFERENCES
* PatronSelfRegistration
* PatronSelfRegistrationDetectDuplicates
* PatronSelfRegistrationVerifyByEmail
* PatronSelfRegistrationPrintTemporaryCard
* PatronSelfRegistrationUseTemporaryStatus
* PatronSelfRegistrationExpireTemporaryAccountsDelay

NEW NOTICE
* Verify by email notice

NEW SLIP
* Temporary card slip

NEW CRON JOB
* delete_expired_opac_registrations.pl
  - Deletes patrons that have not been upgraded from the temporary
    status within the specified delay
* delete_unverified_opac_registrations.pl
  - Deletes the unverified patrons based on the length of time specified
    in the PatronSelfRegistrationExpireTemporaryAccountsDelay

The patron will register from self_registration.pl, linked off opac-main.pl if enabled. The registration page will be translatable to other languages in the same way that existing templates are.

Test Plan:
1) Enable PatronSelfRegistration
2) Set PatronSelfRegistrationExpireTemporaryAccountsDelay to a number
   of days
3) Create a self-registered borrower category
4) Set PatronSelfRegistrationUseTemporaryStatus
5) Set PatronSelfRegistrationVerifyByEmail to "Don't require"
6) Go to OPAC, log out if logged in.
7) You should see the "Register here" link below the login box
8) Attempt to register yourself
9) Verify you can log in with your temporary password.
10) Set PatronSelfRegistrationVerifyByEmail to "Require"
11) Attempt another self-registration
12) Check the messages table, you should see a new message with a
    verification link.
13) Copy and paste the link into a web browser to verify the registration
14) Log in with the given credentials to verify the account was created.

Test Plan - Part 2 - Borrower Modifications

1) Log in to OPAC, go to "my personal details" tab.
2) Make some modifications to your details.
3) Repeat steps 1 and 2 for two more borrowers.
4) Log in to Koha intranet with a user that can modify borrowers.
5) At the bottom of mainpage.pl, you should see:
  Patrons requesting modifications: 3
6) Click the link
7) Approve one change, deny a different one, and ignore the third, then
   submit.
8) Check the records, you should see the changes take affect on the
   approved one, and no changes to the other two. You should also see
   "Patrons requesting modifications: 1" at the bottom of mainpage.pl
   now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Bug 7067 - OPAC Borrower Self Registration - Followup

* Rename PatronSelfRegistrationUseTemporaryStatus to PatronSelfRegistrationDefaultCategory
* Hide register link unless PatronSelfRegistrationDefaultCategory is set.
* Add invalid token page
* Add documentation and switches to cron scripts
* Add required fields check for editing exiting patrons
* Don't force require email address for existing patrons when
  PatronSelfRegistrationVerifyByEmail is enabled.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-14 08:08:59 -05:00
Jonathan Druart
acbfe26c9e Bug 7919 : Display of values depending on the connexion library
In a librairies network, we would like to declare specific values just
for one (or more) library.
Here we implement the ability to associate categories, patron attributes
types and/or authorised_values with librairies (branches).

This patch adds 3 new association tables:
- categories_branches ( association table between categories and branches )
- authorised_values_branches ( association table between
  authorised_values and branches )
- borrower_attribute_types_branches (association table between
  borrower_attribute_types and branches )

Plan test:
  - Create (or modify) categories, patron attributes and
    authorised_values and link it with one (or more) library.
  - Set one of these librairies
  - Go to one of the multiple pages where this specific value must be displayed
    and check that it does appear.
  - Set a library not concerned.
  - Check on the same pages this value is doest not appear.

A page list:
cataloguing/addbiblio.pl
cataloguing/additems.pl
members/members-home.pl
members/memberentry.pl
acqui/neworderempty.pl
tools/modborrowers.pl
and others :)

Please say me if filters don't work on some pages.

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-05 10:10:57 -05:00
Jonathan Druart
de235cef33 Bug 2832: [SIGNED-OFF] Followup: Add a default value
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Makes sense, and works as advertised.
2012-11-28 08:16:07 -05:00
Magnus Enger
aafcebef8f Bug 2832 - Make alphabet localizable
Adds the "alphabet" syspref, which can hold a space separated list
of charachters, which can be expanded into browse links when needed.

To test:
- Make sure to run updatedatabase
- Check that the "alphabet" syspref was added under "I18N/L10N preferences"
- Check that browse links are displayed Home › Patrons
- Add some weird charachters like ÆØÅ to "alphabet" and check that the
  browse links are still displayed ok

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-05 09:25:29 -05:00
Marc Veron
802dd7baf5 Bug 8812 - Staff Client: Patron search should display branch name instead of branch code in results table
Patch to display branchname instead of branch code.

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-11 11:17:06 +02:00
Stéphane Delaune
a8b168dc63 Bug 7671 : add a real primary key accountlines_id in accountlines
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Marc Veron <veron@veron.ch>

NOTE: After applying the patch I got following errors in members/pay.pl:
Global symbol "$writeoff_sth" requires explicit package name
Global symbol "$add_writeoff_sth" requires explicit package name

Added to lines at the begin of members/pay.pl:
our $writeoff_sth;
our $add_writeoff_sth;

Now the patch worked as expected.

However I am not quite sure if signing off is OK in this situation.

Marc

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-09-15 07:31:58 +02:00
Colin Campbell
ef7ebc4ed4 Bug 8017 reduce manipulation of GetAllIssues return
GetAllIssues can produce large lists
For performance purposes:
Dont loop over the list without cause
Dont do expensive processing in the loop
Dont needlessly copy the array
Do display formatting in the template
Dont extract the barcode list unless we are producing it
Reduce db calls by using the data to hand

Make the table in the template a bit more readable
where everything was stuffed into one line

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-13 18:51:45 +02:00
MJ Ray
1fe6e116cb fix bug 7068 - autobarcode not working when duplicating patrons
.. by blanking cardnumber in the code and showing it in the template,
instead of just not showing it in the template

Autobarcode now correctly fills in on a duplicated patron.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-13 18:23:21 +02:00
3b95557c6f Bug 8598 - No patron image or home library on Files & Statistics tabs
Adding the necessary code for patron image, patron
home library, patron category description, and patron
extended attributes to show in the left-hand sidebar.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-13 18:12:17 +02:00
6ca9b8f037 Bug 8590 - checked out from missing on patron detail
Adding back the line in the script which pulls the name
of the branch where the item was checked out.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-29 18:37:54 +02:00
e31b55de31 Bug 7839 [ENH] : Add tab in patron record to show patron's routing lists
dcook: fixed SQL error and removed blank targets

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Thanks. Works as described. Valuable addition on patron information
page.

Ideas of enhancement:

- For some library, and some patron, the routing lists table could be
  very long, and a paged table would be a plus.
- In the table, a new Vendor column.
- The possibility to sort the table entries by Title and Vendor column.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-02 11:26:43 +02:00
Paul Poulain
8648c21ddf Merge remote-tracking branch 'origin/new/bug_7955' 2012-08-01 16:07:08 +02:00
Jonathan Druart
934a8a1156 Bug 7955: Followup : Check the syspref value (avoid sql injection)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Works as expected. Fields with disallowed characters do not show up.
Added 'if $debug' to an pseudo-unconditional warn.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-01 16:06:38 +02:00
b84c772e1b Bug 8392: Avoid having an untranslatable age range
Currently, error message reports an age range in English. For example '0 to
17'. With this patch, the 'to' is not in the .pl file anymore.

Ruth could you sign-off this fix?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-24 17:20:46 +02:00
D Ruth Bavousett
e6c9b20bdb Bug 8392: Category age ranges not being enforced
This patch works around the redefinition of an array that was causing the
enforcement of age ranges to not-happen.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

I can confirm the bug and the solution.
2012-07-24 17:20:42 +02:00
Paul Poulain
37328c709e Merge remote-tracking branch 'origin/new/bug_8130' 2012-07-23 18:06:50 +02:00
Jonathan Druart
43ad3c3367 Bug 8130: Followup: errors must be a hashref
http://bugs.koha-community.org/show_bug.cgi?id=8130
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-07-23 18:06:31 +02:00
d5c51417b5 Bug 8130: [SIGNED-OFF] Followup - Empty file upload error never displays.
http://bugs.koha-community.org/show_bug.cgi?id=8130
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2012-07-23 18:06:02 +02:00
Paul Poulain
612b12f41b Merge remote-tracking branch 'origin/new/bug_8251' 2012-07-16 13:46:31 +02:00
9d4e241ada Bug 8251 - Follow up, use 'day' instead of 'days' for Datetime::truncate
As noted in comment #4 by Jonathan Druart, this should be fixed in every call
to DateTie::truncate function. This patch does exactly that.

julian_m tested that truncate( to => 'days' ) didn't actually do anything, so
it is understandable that this 'fix' might introduce new bugs as we might have
'fixed' at a higher libs level this issue.

'minutes' is used in truncate function too, so fixing.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-16 13:45:45 +02:00
Marc Veron
45f6b755fa Bug 7563 - Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-06 18:23:39 +02:00
Mark Tompsett
79b6e864ad Bug 7630 - Warning on moremember.pl about param without key Move "$error => 1," to its own conditional $template->param()
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-03 18:18:35 +02:00
76b80ac33c Bug 8130 - attach PDF files to a patron record
Adds the ability to attach unlimited arbitrary files to
a borrower record.

Test Plan:
1) Enable system preference EnableBorrowerFiles
2) Look up borrower record, click 'Files' tab on left
3) Upload a file, download the file, delete the file.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
rebased for current master.

Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
rebased again; some indentation issues in include menus.
2012-06-28 10:55:51 +02:00
Jonathan Druart
3069f1e6d9 Bug 8154: The export today's checked in barcodes generated file is always empty
Comparation of date and datetime is always false

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

Exported file contains the list of checked in items.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 23:19:34 +02:00
Jonathan Druart
5e2001a6f8 Bug 7955: Statistics tab for Patron checkouts
This patch adds a new 'statistics' tab in the Patron module.
For a borrower, this tab contains a table with:
- number of checkout for today
- number of checkin for today
- "precedent state", the number of checkouts the patron had yesterday on
  its library card
- "actual state", the number of checkouts on the borrower card at the current date

A new syspref (StatisticsFields) contains a list of fields (separated by
pipe (|) on which the table results is based. The default value is
location|itype|ccode

Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
2012-06-20 21:16:50 +02:00
Ian Walls
d29efac4f3 Talking Tech Support - Phase I
Implements support for Talking Tech I-tiva phone notification for OVERDUE, PREDUE and HOLD notifications.
Overdues respect triggers as configured for the patron's branch.
Predue and Holds notifications respect patron's messaging preference choices.
A new column for phone notification is added if the TalkingTechItivaPhoneNotification system preference is turned on

Record of phone messages being sent to patrons is added to the patron's Notices
tab; notice of success or failure can be retrieved from I-tiva.

See the TalkingTech.README for installation and set-up instructions.

Aside from the control system preference, and the necessary changes to Messaging Preferences
forms to make use of phone notifications, the bulk of the code resides in external
cronjobs.

TalkingTech_itiva_outbound.pl generates the Spec C file to send to I-tiva.  Actual transmission
of the file must be handled by the system administrator.

TalkingTech_itiva_inbound.pl processes the received Results file from I-tiva.  Getting the
file from I-tiva to Koha is the job of the system administrator, as well.

Both scripts have a --help option with full documentation.

The only necessary change to core Koha behavior is in C4::Letters::EnqueueLetter.  The return
value was changed from 0 or 1 (successful addition of letter to message_queue or not), to the actual
insert ID of the letter.  This was required by the outbound script to present a unique Transaction ID
for the notice added to the patron's record (so a 'sent' or 'failed' status could be updated).  Since
the dbh and sth are not shared, and the last_insert_id() command is table-specific, this should be thread-safe.
No changes are necessary to any parts of Koha, as all usage of EnqueueLetter currently ignores the return value.

To Test:

1. Turn on TalkingTechItivaPhoneNotification system preference
2. Verify that 'phone' is now a valid notification option for patrons on both staff and OPAC side
3. Attempt to set a 'phone' preference for PREDUE or HOLD messaging; attempt should succeed
4. Set up the patron for notices to triggers:
   a. include checked out items due in a range of days, including the value set up in their messaging preferences.
   b. place several holds, some in position, others waiting for pickup, others in transit.
   c. set the patron up to have overdues, overdue by a range of days that includes the delay values for
the patrons branch and categorycode
5. Run TalkingTech_itiva_outbound.pl --type=RESERVE --type=PREOVERDUE --type=OVERDUE --outfile=/tmp/talkingtechtest.csv

The resulting talkingtechtest.csv file should include all the items due on X days (where X is the patrons' preference),
and none of the ones due in other increments.  Similarly, overdues messages should be added for each item due by a delay
value as configured; overdues of other numbers of days should be ignore.  Holds that are waiting pick up or in transit should
have messages, those still pending should not.

Messages should be added to the patron's notices tab for each issue sent.  Verify these messages exist, and all Notices
tokens are replaced with appropriate information.

Repeat, this time with 4c making use of the default branch overdue triggers, instead of branch-specific triggers.

To test the inbound script, create a CSV with rows in the format "<<Message_id>>","<<SUCCESS or FAIL>>"
Message ID should correspond to the final column of the talkingtechtest.csv file (the transaction id) for the message.

Primary Authorship: Ian Walls
Additional modifications: Kyle M Hall

http://bugs.koha-community.org/show_bug.cgi?id=4246
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Tested and in use in production by two public libraries : Middletown
and Washoe. Both have given their sign off, but don't have git to
actually sign off.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-10 17:46:52 +02:00
5e43e2f93d Bug 7951 - Suspending holds needs a system preference
Adds system preferences SuspendHoldsIntranet and SuspendHoldsOpac.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2012-06-09 18:45:57 +02:00
55b1c06b17 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>
2012-05-22 12:17:49 +02:00
Chris Cormack
7f2ab970da Bug 6679 :[SIGNED-OFF] members dir now passes perlcritic tests
signed-off-by Jonathan Druart <jonathan.druart@biblibre.com>
2012-04-10 13:44:53 +02:00
d1dc3c0c2e Bug 7641 - Add ability to suspend reserves - Followup
* Switch from C4::Dates to $KohaDates
  * Fix 'Resume All Suspended All Requests'
  * Change button text to follow capitalization rules
  * Change 'requests' to 'holds'

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-06 17:23:10 +02:00
Dobrica Pavlinusic
4fe0af468b Bug 7859 - members/pay.pl plack scoping
Variable "$borrowernumber" is not available at /srv/koha/members/pay.pl line 112.
Variable "$borrower" is not available at /srv/koha/members/pay.pl line 129.
Variable "$input" is not available at /srv/koha/members/pay.pl line 142.
Variable "$borrowernumber" is not available at /srv/koha/members/pay.pl line 157.
Variable "$user" is not available at /srv/koha/members/pay.pl line 171.
Variable "$input" is not available at /srv/koha/members/pay.pl line 172.
Variable "$input" is not available at /srv/koha/members/pay.pl line 181.
Variable "$borrowernumber" is not available at /srv/koha/members/pay.pl line 187.
Variable "$branch" is not available at /srv/koha/members/pay.pl line 187.
Variable "$borrowernumber" is not available at /srv/koha/members/pay.pl line 222.
Variable "$input" is not available at /srv/koha/members/pay.pl line 239.
Variable "$borrowernumber" is not available at /srv/koha/members/pay.pl line 246.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-03 18:13:12 +02:00
f446b3d03d Bug 7641: Suspend Reserves
Adds the ability to suspend reserves. The new system preference
AutoResumeSuspendedHolds enables the ability to set a date for
a suspended hold to automatically be resumed.

When a hold is suspended, it will continue to increase in priority
as the holds above it are fulfilled. If the first holds in line
to be filled are suspended, the first non-suspened hold in line
will be used when an item can fulfill a hold that has been placed.

http://bugs.koha-community.org/show_bug.cgi?id=7641
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Tested with the preference on and off:
1. placed several holds in the staff client
2. suspended some with a date
3. suspended some without a date
4. triggered hold message by checking in for hold with suspensions
5. the suspended hold was skipped as it should be
6. tested suspending holds in the OPAC w and w/out dates
7. ran the cron to clear suspensions with dates

All the above tests worked as expected. Signing off.
2012-03-29 14:37:49 +02:00
Paul Poulain
d5542514d2 Merge remote-tracking branch 'catalyst/merged_5549' into new/bug_5549
Conflicts:
	installer/data/mysql/updatedatabase.pl
	members/moremember.pl
2012-03-22 17:34:26 +01:00
Dobrica Pavlinusic
4eeb14c52b Bug 7769 - members/pay.pl: $template scoping for plack
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 16:28:09 +01:00
Jonathan Druart
bb35b60828 Bug 7154: Modification in borrower attributes
* group some attributes for a more friendly display

* allow a link between a borrower category and an attribute to display
  it only for the specified category

* Attr classes filled with AV 'PA_CLASS' category (you have to create AV
  with a new category 'PA_CLASS' to fill class list)

this patch add 2 fields in borrower_attribute_types :
    category_code
    class

Signed-off-by: Julien Sicot <julien.sicot@gmail.com>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 16:08:28 +01:00
Chris Cormack
0c40ff9f98 Merge remote-tracking branch 'kc/master' into merged_5549
Fixed conflicts

Conflicts:
	catalogue/moredetail.pl
	installer/data/mysql/updatedatabase.pl
	koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2012-03-22 09:36:55 +13:00
c5abb58f7c Bug 7597 - Part 4 - Change C4::Acounts::WriteOff to WriteOffFee
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
2012-03-21 17:13:41 +01:00
360e2f82e7 Bug 7597 - Part 3 - fines not recording the right info in the stats table
This commit fixes writeoff_all to write off only the amount outstanding
for each fine being written off, rather than the original amount owed.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Tested all three patches together and was able to write off single
and multiple fines and the data was correct in the stats table.
2012-03-21 17:13:37 +01:00