Commit graph

143 commits

Author SHA1 Message Date
Joe Atzberger
efa79c13b2 Basic cleanup of fixup_cardnumber
Avoid warning on syspref "checkdigit" undefined.
Functionality essentially unchanged.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:27:48 -06:00
Andrew Elwell
b49d937e2c more Minor documentation fixes
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-26 14:45:58 -06:00
Galen Charlton
05864978c5 bug 2126: reduce round-off errors in fine balance
If a patron has a number of fine transactions, the
total could be wrong.  This is particularly noticeable
when a patron has a zero balance, as summing a group
of floating point values derived from decimal(6,2) columns
can result a scalar value that is not zero.

Koha really should be using integral arithmetic
or appropriate accounting modules to do fine and
acquisitions calculations.  Using floating point scalars
for monetary amounts is always a mistake.

This patch also prevents an account maintenance
fee from being applied when renewing a patron if the
amount would be 0.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:31:52 -06:00
Galen Charlton
3a7ae97440 followup to patch for bug 2900
Previous patch broke date comparison that sets
overdue flag - now that ISO-formatted date
strings are being compared, must use "it"
instead of "<".

"2009-01-02" lt "2009-01-08" is true
"2009-01-02" <  "2009-01-08" is *false*

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-08 14:19:09 -06:00
Joe Atzberger
c70cd87d54 Bug 2900: fix GetPendingIssues.
GetPendingIssues did several bad things:
~ select * on a 4 table join,
~ including multiple namespace collisions,
~ including large fields marc and marcxml from biblioitems,
~ return ($count, \@array_being_counted).

Not everything is fixed here (see FIXMEs), but the situation is
improved considerably, with bug 2900 resolved.  The "timestamp"
namespace collision in query should be resolved by separate patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-08 11:08:27 -06:00
Galen Charlton
53d4e8fa2c bug 2856 followup: remove unconditional warn
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-29 13:55:22 -06:00
Nahuel ANGELINETTI
61ebf9160f (bug #2856) Activate the duplicate patrons detection and check birthdate only if one is set
This patch activate the check of unique member, it was checked but not shown, and the member was added even if a duplicate was
detected.
It improve the duplicate detection, to check the birthdate only if it was specified in the form.
And fix an url of "Yes" link(if the borrower added IS the duplicate detected).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-29 13:46:11 -06:00
Nahuel Angelinetti
873d1c6336 bug #2757: change the opac login generation
This patch change the method used to generate a new login for a user when his informations are modified(memberentry.pl).

Before the login are generated with the first letter of lastname and the 9 first letter of the surname, and do not verify the
login already exist).
Now the login will be lastname.surnameX, where X is an incremented digit if the login already exists.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-02 08:35:01 -06:00
Joe Atzberger
679871767f Squash warnings by checking if $type is defined before comparing it.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 14:16:58 -06:00
Michael Hafen
0da84bb4fe Adding a few columns to members/readingrec.pl
Add barcode and issues.renewals to members/readingrec.pl
Had to change the query in C4/Members, items.renewals was squashing
issues.renewals.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 14:47:21 -05:00
Michael Hafen
3a902f4bc3 bug: query squashes issues.timestamp which circulation.pl needs to sort todaysissues
Little change to the query so we get the right timestamp to sort on.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-05 21:03:21 -05:00
Danny Bouman
bb76d95a91 bug2580: category name and home library will now correctly display on all patron tabs
This patch fixes several improperly named variables and includes the home library variable on the pages that were missing it. The category
description was added to the GetMemberDetails function since a couple of the pages using that function required the variable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-09 10:52:39 -05:00
Joshua Ferraro
8f4f59a5bb 2433: Cannot apply manual credits with an item number
This patch changes the behavior so that you can enter in
a barcode instead of an itemnumber for the manual credit
and invoice screens. Also, the borrower's account page now
displays a link back to the item record if an item was
linked to the charge
2008-08-09 12:56:04 -05:00
Joe Atzberger
49e4e7020d Patron import reform - bug 2287 - expanded error catching and feedback
This incorporates and extends the patch from MJ Ray attached to bug 2287.
Added feedback of up to 25 lines, including for errors at the Text::CSV
parsing level.  This allows feedback for problems than involve encoding.
Added link to download "starter" CSV file (with all the columns).

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-06 09:37:03 -05:00
Chris Nighswonger
1baf6348cc kohabug 2404 This patch removes Image::Magick and adds GD
This patch removes Image::Magick as a dependency and replaces it with
the (much) lighter GD. Functionality of patronimage code has not changed with
this conversion.

Adding errorhandling for corrupted image file and link to return to moremember.pl when called from there

Added notes about supported image mime types.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-30 03:38:18 -05:00
Jesse Weaver
406dbcd39a kohabug 2379 When a borrower is added manually in Koha...
This checks that the enrolmentfee for a category both exists, and is greater than 0, avoiding a spurious charge.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:10:29 -05:00
Andrew Moore
15ca4bd8fa bug 2284: ModMember can erase the dateofbirth field
patch to C4::Members::ModMember to prevent it from deleting the dateofbirth field when none is supplied.

I also added a KohaTest::random_date method to help generate randomish dates for the test suite.
Added some tests for Member::ModMember. This is an easy method to test, and this bug shows that it
could use some closer examiniation.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:40:46 -05:00
Andrew Moore
4e6eb990a3 bug 2274 [5/5]: removing some warnings
running misc/cronjobs/overdue_notices.pl with warnings on has uncovered some warnings in
C4::Members. This patch eliminates them.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:10:53 -05:00
Andrew Moore
8ae66932cd Bug 2274 [3/5]: consolidating overdue notice cronjobs into one
This patch adds the misc/cronjobs/overdue_notices.pl script that is intended to replace
overduenotices.pl, overduenotices-30.pl and overduenotices-csv.pl. It adds messages to
the message_queue to be sent later (by process_message_queue.pl). It also marks borrowers
as debarred if their issues become too overdue.

It is intended to be run from cron nightly with usage something like:
0 2 * * * misc/cronjobs/overdue_notices.pl

C4::Members:
 - improved documentation on ModMember
 - made ModMember return a useful value (the return value of the database call)
 - added a DebarMember method
 - adding t/lib/KohaTest/Members/DebarMember.pm to test ModMember

misc/cronjobs/overdue_notices.pl
 - designed to replace overduenotices.pl, overduenotices-30.pl, and overduenotice-csv

Changes to C4::Letters:
 - EnqueueLetter now lets you pass in to_address and from_address which can override defaults
 - _send_message_by_email pays attention to these defaults.
 - now handles attachments with MIME::Lite

C4::Overdues
 - added GetBranchcodesWithOverdueRules
   - added t/lib/KohaTest/Overdues/GerBranchcodesWithOverdueRules.pm to test that.

circ/overdue.pl
 - replaced call to obsolete overduenotices-csv.pl with call to overdue_notices.pl

KohaTest:
 - added three helper methods: random_phone, random_email, random_ip
   - these can be used to populate example records
 - you can now pass an optional lengh to random_string

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:10:46 -05:00
Galen Charlton
3104120b13 POD fixes - C4/Members.pm
Corrected and improved the description of the
return values of GetMemberDetails.

Also fixed errors reported by the podcorrectness
test.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:21 -05:00
Ryan Higgins
3675d88035 Fix upgrade-child: could not update child unless guarantor was defined. Also, limit upgrade path to C -> A .
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-12 16:36:50 -05:00
Andrew Moore
5838b70b06 removing warnings from C4::Members::GetMember
C4::Members::GetMember emitted a few unnecessary warnings when no $type was passed in. This patch prevents that.

No functional or documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 06:52:17 -05:00
Henri-Damien LAURENT
89fa713124 Bug Fixing : ModMember and memberentrygen.tmpl
Problem with ModMember : parameters were not passed safely
memberentrygen.tmpl deleted guarantorid for a children if step2 or step3 used fore edition.
Changeing TMPL_IF EXPR into TMPL_IF Name

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-16 08:21:09 -05:00
Galen Charlton
472d77353e patron cleaning - do not delete staff borrowers
Adjusted C4::Members::GetBorrowersWhoHaveNotBorrowedSince so
that staff member records are not selected for deletion.

This functionality change is motivated by the consideration
that a staff member who is authorized to operate Koha is
not necessarily a prolific user of the library's services.
If a batch purge job for inactive staff records is really need,
it should be a separate tool.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:40:33 -05:00
Galen Charlton
b42b8da0d6 kohabug 1573 - properly count patrons to delete
When both the patron delete and patron anonymize checkboxes
were selected, the patron cleaning tool would not
properly register the number of patrons to delete.  Fixed
by correcting form input handling.

Also, count of patrons to delete or anonymous now correct
when running with IndependentBranches = ON.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:40:32 -05:00
Henri-Damien LAURENT
9fb4a72122 Bug Fixing 1782 patch
Adding a new routine GetBorrowercategoryList in C4/Member
Displaying categoryname when listing categories in memberentrygen.pl
using categorytype returned with GetMember wherever it is possible.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:42:25 -05:00
Galen Charlton
5c1d14d822 C4::Members::SearchMember - support attributes
Modified SearchMember() so that if the patron attributes
feature is on (i.e., ExtendedPatronAttributes is ON), it
is possible to search for patrons on any attributes whose
type is set as staff searchable.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:03:04 -05:00
Henri-Damien LAURENT
d08d9e3fb7 Addressing bug 1782
Adding New Systempreference AddPatronLists
This systempreference allow administrator to choose if patrons are created on categorycode lists or category_type ones.

Overloading GetBorrowerCategory so that if no parameter provided, it returns the list of category records
Changing memberentry.pl in order to use the categorycode when provided.
Bug Fixing Circulation.pl so that doesnot come up with Error 500
with no category selected for GetBorrowerCategory

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 05:49:27 -05:00
Galen Charlton
e4ea107c9b use bind variables in GetBorrowersWhoHaveNotBorrowedSince query
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:56 -05:00
Henri-Damien LAURENT
48856684f3 Assigning bug 1835 : change password would never log password change.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:44 -05:00
Henri-Damien LAURENT
5904681fac CleanBorrowers fixing.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:40 -05:00
Galen Charlton
afb36c429e refactor C4::Log::logaction
This fix should resolve in whole or in part several bugs
characterized by the error message 'Can't use string ("0")
as a HASH ref while "strict refs" in use', including
bugs 1101, 1899, and 1910.

There are some possibilities for future work:

[1] Dealing with an operator override, e.g., where
    a circ operator needs to get a supervisor
    to enter a login and password and escalate
    the original operator's privileges for a
    transaction, e.g., to forgive a fine.  This
    is an enhancement, of course.
[2] Creating a dummy operator to represent
    batch job runs; or alternatively, give
    each batch job an option to log its work
    under a specified user ID.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 06:34:10 -05:00
Chris Nighswonger
35df86da59 Correcting Logging on ModMember function so that the query is logged in the 'info' field.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-18 15:09:55 -05:00
Galen Charlton
9222f7a6ca created old_issues and old_reserves tables
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:

* borrowernumber and biblionumber in old_reserves can be
  NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
  set the child column to NULL if the parent row is deleted
  instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
  a branch to be deleted without changing archived requests.

Some miscellaneous cleanup was done as part of this patch:

* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:36:31 -05:00
Chris Nighswonger
55b353f79a Adding Update/Delete functions to patron image management on Details page
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-06 12:14:44 -06:00
Chris Nighswonger
1c1cb10e5e First installment on moving patronimages into the database.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-23 10:55:37 -06:00
Henri-Damien LAURENT
249b1c6b27 Displaying Sort Authorised values if linked to authorisedvalue list.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-11 06:10:04 -06:00
Henri-Damien LAURENT
5009969845 using Warn and not print for debugging purpose
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-11 06:10:01 -06:00
Joe Atzberger (siptest
1527f93f3a Members.pm - make sure we don't return empty refs (is firstname fallback really needed?)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-08 06:08:04 -06:00
Chris Nighswonger
c6d6f60013 More fixes for patron images
Added GetPatronImage function to Members.pm
Added code to circulation.pl, boraccount.pl, readingrec.pl, and moremember.pl to grab patron image and pass it off to the template
Corrected code in circ-menu.inc to properly display patron image.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-03 07:24:28 -06:00
Joe Atzberger
e660a339a8 Members.pm - BEGIN block VERSION and vars related to export.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:34 -06:00
Chris Cormack
f077aa6c1f Fix for bug 1730 fixing display for pay.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 01:57:50 -06:00
Joshua Ferraro
8d072519b6 synching deletedborrowers table with borrowers table
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 21:30:30 -06:00
Chris Cormack
48b4d54408 Fix for bug 1515
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 20:51:22 -06:00
Chris Cormack
28fe361296 Fix for bug 1666
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-27 17:21:35 -06:00
Chris Cormack
dfc5c181bc Big bugfix for bug 1631
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-26 18:40:28 -06:00
Chris Cormack
ac21232fd5 Fix for bug 1691
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-26 14:33:08 -06:00
Chris Cormack
5d0a5eb01e Fixing a problem that was causing double conversion of dates
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 20:51:41 -06:00
Joe Atzberger
c102b3c6f5 Members overhaul for Dates.pm - Stop double converts and disappearing expiration mods.
Allow errors displayed by memberentrygen.  Please confirm with add'l tests, feedback.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 19:19:00 -06:00
Joe Atzberger
0c3fb7051e Members.pm - checkuniquemember minor refactor and perldoc correction.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 19:11:52 -06:00