Commit graph

438 commits

Author SHA1 Message Date
Paul Poulain
e07b36dd90 Bug 5877 : Offline circulation improvements : upload all files, apply at once
Offline circ : You now can upload all offline files from the Firefox extension.
Once all circ desks have uploaded the file, the librarian can apply all of them, sorted by date.
This avoid the problem of someone issuing an item on desk A, returning it on desk B.
Before this improvement, if desk B uploaded the file before A, the return was applied before the issue,
resulting in the items reamining issued.

Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
2012-03-02 17:49:35 +01:00
biblibre
f4a5206ae0 Bug 6137: fix a Circulation bug. userenv null
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2012-02-17 18:38:42 +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
Paul Poulain
098ac93315 Merge remote-tracking branch 'origin/new/bug_6842' 2012-02-10 15:19:20 +01:00
Kyle M Hall
58c62f69c1 Bug 6490 - Lost and paid not updated when book is checked out.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Tested:

item checked out and marked lost - item is removed from borrower's checkouts and charged to patron
Checking out the item (without checking it in first) removed the fines and issued the item normally.

Passed prove t xt t/db_dependent (results congruent with current master failures)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-03 17:37:52 +01:00
Srdjan Jankovic
6b092f0e27 bug_7190: Do not reverse writeoffs when item is returned
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-02 14:21:08 +01:00
Henri-Damien LAURENT
54e6b44da9 Bug 6842 FU : library transfer limits edits not stored
Followup :
Changes the DeleteBranchTransferLimits signature :
one now needs to delete only the limits for ONE branch
2012-02-01 22:47:56 +01:00
Paul Poulain
9c06057f21 Merge remote-tracking branch 'origin/new/bug_6328' 2012-01-19 16:50:49 +01:00
Lyon3 Team
0e9edb1102 Bug 6328 follow-up, fixes Undefined subroutine &C4::Circulation::Delta_Days
The Delta_Days sub is called only when a patron that is already debarred must be debarred for a longer period.
This (rare) case probably hasn't be tested during QA, because the sub is not loaded.
Loading it fixes the problem

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-19 16:49:25 +01:00
Srdjan Jankovic
6e07fd7b00 bug_2830: Remove reserve when checking out if the borrower is not the first one in the reserve queue
To test:
Create 4 holds on a bib, for patrons A, B, C, and D,

Check in the item to mark hold as waiting for patron A
Check out the item to patron B -> reserve for patron B should be removed
Check in the item to mark hold as waiting for patron A
Check out the item to Patron A, hold should complete normally
Check in the item to mark hold as waiting for patron C
Check out the item to patron D -> reserve for patron D should be removed.
Check in the item to mark hold as waiting for patron C
Check out the item to patron C, hold should complete normally
Check in the item -> there should be no more reserves.

We also tested:
Created 4 holds on a bib with two items, for patrons A, B, C, and D

All worked as expected.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-16 16:21:38 +01:00
Srdjan Jankovic
1713133fdd bug_5211: LostItem() - added charge_fee param to control fee charging
Pass charge_fee = yes wherever is LostItem() called, which effectively
means tha there's no change.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:36:34 +01:00
Paul Poulain
1fe3514c3c Bug 6328 fine in days does not work
Some code coming from BibLibre has been lost in the process of inclusion in
3.4. The result is that fine in days does not work at all (you can setup rules,
but it does nothing)

Step to reproduce:

- Koha > Admin > circ rules > set 1 day fine every day of overdue for default
  rule
- Issue a book return date last week
- check-in the book => no debarment is set

The following patch will fix all of those problems by :

* updating borrowers.debarred to a date field (instead of tinyint). It contains
  the limit of the debarment
* changing API of DebarMember and UpdateBorrowerDebarred to pass a date
* display debarrdate where applicable. Note that a debarrdate of 31/12/9999 is
  considered as unlimited and not displayed
* added a debarrcomment, usefull to explain why a patron is debarred (this is
  independant from debarrdate changes and can be used when placing an unlimited
  debarment too)

[2011-05-12] F. Demians. It works as described. And I can confirm this
functionality is impatiently awaited by French libraries since one year. Thanks
BibLibre for the good work and for contributing this code.

Bug 6328 Followup--update DB structure

Thanks Katrin.

Bug 6328: make comment a textbox / fix debar by notice trigger

Debarring by notice triggers was broken, because the new function
expects a date as second parameter.

The comment field in patron account details was a very long text field.
Patch changes it to be a textbox instead.

Bug 6328: Lift debarment leaves patron account

'Lift debarment' redirects to an empty circulation page.

BZ6328 follow-up 3

Fixes comment 23 from Fernando L. Canizo : when the patron was debarred and debar removed
he still could not check-out.

The changes in the IsMemberBlocked (that were on biblibre/master) were lost somewhere
The sub was still checking for old_issues instead of calling CheckBorrowerDebarred
to get a debardate if applicable

Note : this bug was appearing only is you had issuing rules defined for itemtype/categorycode/branch.
Seemed to work if you had only default rules. That's probably why it hadn't been spotted before

BZ6328 follow-up 4
Comments fron Zeno Tajoli: The patch is OK and I sign-off it. Two little changes done on
installer/data/mysql/kohastructure.sql and installer/data/mysql/updatedatabase.pl

Signed-off-by: koha <koha@kohabase.localdomain>
2011-11-25 14:00:47 +01:00
Colin Campbell
862b6ee90d Bug 7191 Remove GetBorrowerIssues from @EXPORT
No subroutine GetBorrowerIssues exists in C4::Circulation
So don't export it into users' namespace

Signed-off-by: Albert Oller <ago@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 13:45:13 +01:00
Ian Walls
c5bc35b694 Bug 7060 Followup: AddReturn needs GetMemberDetails
In my haste, I overlooked circ/returns.pl's need for borrower flags.  This patch
changes back the call in AddReturn from GetMember to GetMemberDetails

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-22 04:07:37 +13:00
Ian Walls
769acee41a Bug 7060: GetMemberDetails unnecessary in C4::Circulation
Replaces all instances of GetMemberDetails with the more efficient GetMember.  Since
no hash values other than the borrowers table's fields are used in this module, the
transition is safe.

To test:

1.  Checkout a material; the page should load without error
2.  Renew a material: the page should load without error
3.  Return a material: the page should load without error

The above test plan invokes all the subroutines affected by this patch; any call to an undefined
value in a hashref should give a warning

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-20 14:09:58 +13:00
Paul Poulain
56b9412562 Bug 7036 de-nesting C4::Circulation
Just removing use C4::Koha, as other packages are widely used.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-19 03:47:31 +13:00
Srdjan Jankovic
4770555855 bug_5533: Slightly improved marking items as lost
Call LostItem() whenever item is lost.
LostItem() new arg - mark returned.
Disabled Lost Status on catalogue item edit.

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

For follow up we need to explain how to hide the 952$1 (lost) from
the framework by putting it in the 'ignore' tab.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-18 09:01:39 +13:00
Ian Walls
e05d53d50d Enh 6403: Record local use stats when checking in unissued materials
Adds a new system preference, RecordLocalUseOnReturn, which when active will change the statistical
entry type from "return" to "localuse" in AddReturn() if the material was not on loan when returned.
The intended use-case here is for libraries with 'open' book drops, in which patrons can put locally
used (but unissued) materials.

Adds a small message to the user interface to confirm that Local Use was recorded.

This change opens up the possibility to record more types of statistics on return; one would just need
to update the $stat_type variable accordingly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-09 19:50:41 +13:00
Meenakshi.R
073f4fa7c3 Bug id:6783 - Circulation restrictions dont work when other withdrawn reasons are used
Circulation restrictions work only when withdrawn reason (value 1) is selected.
If ones sets up other withdrawn reasons using authorized values, and selects
one of them (e.g. value 2), circulation restrictions don't work. This changes
fixes this problem.

Signed-off-by: Amit Gupta <amit.gupta@osslabs.biz>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-11 21:40:09 +12:00
Ian Walls
18c491542b Bugs 6634: manager_id not recorded for payments and rental charges
Manager_id, the borrowernumber of the staff person doing the action, was not recorded
for payments, rental charges, or rental charges on renewals.  This patch implements that.

This patch also adds the recording of itemnumber in a payment, by taking the itemnumber of
the account that it's paying off.  This addresses bug 2696, though it does not make any
change to the display logic of the Payments line in the staff client.

To test:
1.  Check out an item with an issuing charge
2.  Renew the item
3.  Pay one of the rental charges on the item
4.  Verify in koha.accountlines that each of the three above operations recorded your borrowernumber
in accountlines.manager_id

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-15 15:28:29 +12:00
Magnus Enger
610457ea41 Bug 6450 - No check in/check out messages in message_queue
Huge thanks to Katrin Fischer for spotting what was the trouble here!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
2011-07-03 08:55:49 +12:00
Ian Walls
5ae3a3aa4f Bug 5929: use branch admin email for advance_notice.pl emails
This squash commit takes the two patches from Srdjan and adds a minor fix to work with
template toolkit variable renames.

Squashed commit of the following:

commit 2cab669d1fd072600942e1e6fbf3378944255a68
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Thu Jun 2 14:08:40 2011 -0400

    Bug 5929: Fix advanced_notices to use new template-toolkit compatible message names

    Uses 'item_due' and 'advance_notice' for advance notices names; letters do not send otherwise

commit caded04702d5eebd0f63a3b93cdddce28257f092
Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Date:   Tue Mar 29 12:38:49 2011 +1300

    wr77490 (bug 5929): removed debugging leftover

commit 1944de0de40f937b1d8748500f24a119390db3f0
Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Date:   Tue Mar 22 19:05:23 2011 +1300

    wr77490 (bug 5929): use branch email in preference for due notices

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-04 19:41:26 +12:00
Chris Cormack
67e3b86181 Fix for Reserves.t allow the tests to run without a logged in user 2011-04-14 15:03:37 +12:00
Chris Cormack
56d7ab5a19 Merge remote branch 'kc/new/enh/bug_5548' into kcmaster 2011-04-02 19:58:17 +13:00
Colin Campbell
78dfaa1831 Bug 5548: Correct punctuation in patch
Punctuation should be a semi-colon not a comma
It works but is a trap for the unwary in the future

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 19:57:13 +13:00
Chris Cormack
937f27e619 Merge remote branch 'kc/new/enh/bug_5548' into kcmaster 2011-04-02 06:44:40 +13:00
Ian Walls
1b402c7422 Bug 5548 Follow up: Confirm Checkout message where it shouldn't be
Fixes the main Hard Due Dates conditional to first check for the existence
of $hardduedate, then the existences of its ISO export, then finally that that
value is not '0000-00-00'

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 06:42:07 +13:00
Chris Cormack
4990b0d2ee Bug 5578 : Follow up patch fixing FSF addresses 2011-04-01 15:48:19 +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
Chris Cormack
849342e3f5 Merge remote branch 'kc/new/enh/bug_5548' into kcmaster 2011-04-01 09:12:58 +13:00
Ian Walls
1d6fa48d19 Bug 5578 Followup: Hard Due Dates break hard-coded default circ rule
If you do not have an applicable circulation rule for a combination of branch,
item type and patron category defined in your Circulation and Fines rules,
the Hard Due Dates development prevents circulation by introducing an error:

Can't call method "output" on an undefined value at /home/magnus/kohahead/C4/Circulation.pm line 2713

This is because the $hardduedate variable is not defined.  Changing the conditional
to check it, rather that it's output, fixes the issue.  That's what this patch does.

Is this the longest commit message for a single line fix?  Maybe.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 09:10:45 +13:00
ruth@bywatersolutions.com
0a64cfba5e Bug 6004/3270: Sending things "home"
This patch addresses two problems:

Bug 6004:

If an item is returned at other than its' home library, and there is a hold for
it--at any library other than the return library--two prompts come up: one
telling the user to send the item home, and the other, to confirm and transfer
for the hold.  Only the latter should be displayed.

Bug 3270:

Cancelling a hold request after transfer initiated orphans item.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-31 21:20:12 +13:00
Ian Walls
e57dadf762 Bug 5548: Hard Due Dates Circ Rule
Implements the RFC found at http://wiki.koha-community.org/wiki/Hard_Due_Dates_Circ_Rule_RFC.  See squashed commits
messages below for details of implementation.

Squashed commit of the following:

commit 871b91af00871146eb1216ebf5ce673dda2c5925
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Tue Dec 28 15:09:49 2010 -0500

    Hard Due Dates dev part 3: implementing the due dates in circ

    CalcDateDue now calls GetLoanLength, rather than each invocation running separately one after another.  Therefore, instead of
    the 'loanlength' param, CalcDateDue now takes 'itype', and uses the info to get both the issuelength and the hardduedate info (if it exists)

    Global Due Date no longer populates in the sticky due date field in Circ, since it can't be determined before the item is scanned.  Any specified
    due date still overrides the circulation rules, if allowed.

    Hard Due Dates in the past will return an error message, but can be manually specified if truly desired.

    Also, a small fix to updatedatabase.pl to allow the old data to populate if possible.

commit 14d5505f3c01287a2464a759f0076c1d4b665c49
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Mon Dec 27 18:28:11 2010 -0500

    HardDueDates dev part 2:  adding admin interface

    Adds columns to Smart Rules page, including calendar for easy date selection.

    Removes globalDueDate and ceilingDueDates from system preferences editors

commit 76e3e3d86a7a54c6ce4253e7f68278b4dc75a0bb
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Mon Dec 27 15:58:05 2010 -0500

    HardDueDates dev part 1: database changes

    Adds two new columns to issuingrules, a hardduedate and a hardduedatecompare.  If globalduedate is set, use that as the universal value
    for all circ rules.  Else, if ceilingduedate is set, use that as the universal value.  Adjust the comparison accordingly (-1 before, 0
    exact, 1 after).  the old system preferences globalDueDate and ceilingDueDate are then removed.

    Rebased onto 3.03.00.032

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:35:45 +13:00
Colin Campbell
88cb47339a Bug 5708 : Get Correct Discount when levying rentalcharge
Branch can be a parameter so it should be included in the rule retrieval
Need to select the most appropriate rule from those returned
(was defaulting to first returned!)
Try to make what's happening a bit less opaque
null fields are returned as undefined not 'NULL' by DBI

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:01:37 +13:00
Paul Poulain
ddbedbfc2f Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
Jared Camins-Esakov
83ab549724 Bug 5811: Add sysprefs to control overriding fines
This patch adds two sysprefs to allow libraries more fine-grained control over
when fines can and can't be overridden. The two sysprefs are:
* AllFinesNeedOverride - when this syspref is set to "Require" (default) any
    fine will require a staffmember to override the fine in order to check out a
    book.  When set to "Don't require," fines below noissuescharge will not need
    any override.
* AllowFineOverride - when this syspref is set to "Allow," staff will be able to
    override fines that are above noissuescharge. When set to "Don't allow"
    (default), staff will not be able to check out items to patrons with fines
    greater than noissuescharge.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-04 09:33:18 +13:00
Ian Walls
a0dc124a95 Bug 3881: OPAC Privacy reimplementation
Reimplements Paul Poulain's original OPAC Privacy patch, with some minor improvements and changes to wording

If the library enables the OPACPrivacy system preference along with the opacreadinghistory preference, and sets
an AnonymousPatron (must be a valid patron number in the database), the user will see a new tab upon login to
the OPAC, My Privacy.  From there, the user can:

- Set their OPAC Privacy to one of three values
  0 - Forever.  This keeps their reading history unless they explicitly delete it; the bulk anonymiser won't touch it
  1 - Default.  Keep reading history until either they delete it or the library does
  2 - Never.    Instantly anonymises reading history upon item return

- Instantly delete their reading history
  There is a warning and a popup to confirm.  I've removed Paul's extra confirm checkbox, which seemed redundant

A note of which preference the patron has selected is added to the Patorn Details page in the staff client.  This is read-only.

This patch also consolidates Privacy system preferences into the Privacy section of the OPAC tab.

Thank you to BibLibre for the original implmentation of this patch, and Los Gatos Public Library for funding and
testing the reimplementation.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-31 22:23:50 +13:00
324991fefd Fix for Bug 4946 - hold warning needs rewording
This patch improves the phrasing of several messages by
breaking the message variable into distinct parts for more
natural-sounding warnings when:

- Checking out an item on hold for another patron
- Checking out an item which is waiting for another patron
- Checking out an item which is checked out to another patron
- Checking out an item which is checked out to this patron
- Checking out to a patron who has too many checked out

I would appreciate special attention to my changes to the
TooMany function in Circulation.pm to make sure I handled
it correctly.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-17 09:45:03 +13:00
Srdjan Jankovic
4d1762f5ec Bug 2965: Allow due date in the past
Raise warning rather than disallowing
Remove due date js validation when checking out

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed small error in circulation.tmpl
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-14 13:49:15 +13:00
Koustubha Kale
e4cbc4f421 Bug 5418: Rev-5 patch new itemBarcodeInputFilter for libsuite8 style barcodes
In India a ILS product called Libsuite8 prints barcodes like b0007432. The barcode is not stored anywhere in libsuite8's database. Neither is barcode available in any of the reports generated by the software.

The barcode 'b0007432' when scanned into the libsuite8 software is de-constructed like 'b' which is the itemtype i.e. Book in this instance, and '7432' which is the 'Accession Number'. The software then takes the logged in staff's branchcode and does a join on three tables 'Location', 'Media_Type', and 'Books' to retrieve the particular record from the database.

There is no possibility of recreating the barcodes for insertion in Koha while doing a retrospective conversion, because of arbitrary length of the barcode string AND arbitrary number of zeros in the numeric part of the printed barcode AND the fact that there are no reports available from the software which contain barcodes AND the fact that the barcode is not stored in the database.
But most importantly due to the simple fact that printed barcodes are duplicated among branches.

Therefore this patch emulates the functionality of Libsuite8 software of converting the scanned barcode into one stored in Koha using the itemBarcodeInputFilter system preference.

To use this new itemBarcodeInputFilter systempreference choice called 'libsuite8', the barcodes stored in Koha must match the pattern of <branchcode>-<itemtype_code>-<accession_number>. This is easy to achieve while doing retrospective conversion from Libsuite8 to Koha.

As expected the itemBarcodeInputFilter will return unmodified barcode if presented with a barcode of pattern <branchcode>-<itemtype_code>-<accession_number>

This revision corrects the way updatedatabase.pl is changed in order to correctly update version and insert the libsuite8 option in the database. Also kohaversion.pl is changed in the recommended format of 3.0X.0X.XXX to reflect database has changed.

This revision also changes the erronorous itemBarcodeInputFilter description in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref from 'scanned patron barcodes' to 'scanned item barcodes' there by eliminating need for a separate patch for bug 5417.

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

1) applied patch to HEAD
2) set next database number in kohaversion.pl and updatedatabase.pl
3) webinstaller kicked in, update ok
4) typed the barcodes from test cases into check-in

Barcodes used my local branch code, everything seemed ok to me.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-12 20:39:20 +13:00
Henri-Damien LAURENT
45604b8d17 (bug 3536) fix homeorholdingbranch on return
this patch create a new systempreference "homeorholdingbranch"-like used only for returns.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

An additional edit was made to circ/returns.pl by Ian Walls of ByWater Solutions to force the dialog message for the return to
use the branch specified by the new HomeOrHoldingBranchReturn system preference, rather than always Homebranch.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 20:04:30 -04:00
Nahuel ANGELINETTI
d990e2cd32 (bug #4084) fix offline circ
this add the function C4::Circulation::GetOpenIssue and delete \r chars when processing koc files.

Cherry picked from 3.0.x commit 5af80ab

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-09-29 18:17:36 -04:00
7c0e441d50 replace references to defunct info email address
Now links to Koha project website.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-25 05:18:44 -04:00
Andrew Elwell
aa9b4d92cd POD Cleanups
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-09 08:38:59 -04:00
64daee5495 fix a common "developement" typo
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 14:38:38 -04:00
Chris Cormack
891a0248f7 wr-70205 Rental discount not being respected
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-11 08:15:32 -04:00
7c826bc816 Fix for Bug 3666, Overriding renewal limit means negative count in OPAC
Setting "renewalsleft" variable to zero if it comes out negative.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-11 06:01:36 -04:00
Nahuel ANGELINETTI
6626e8fcca (MT #2966) fix opac-user.pl function problem
This uncomment a uselessly commented function that is needed by opac-user. And fix this function that doesn't work properly.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-07 13:10:59 -04:00
Michael Hafen
ea0c76af7f on checkout ask for confirmation if borrower from different branch
With IndependantBranches on check that the borrower is from the same branch as
the librarian.  If not then ask for confirmation.  This check is skipped for
SuperLibrarians.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-03 09:17:19 -04:00
Ian Walls
2d3722b5a3 Fixes bug 4369: Local use does not update datelastseen
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-03 09:04:23 -04:00
d575278cba bug 4036, 4405: overdue and fine day block improvements
* Adopted wording suggested by Kyle Hall for the
  USERBLOCKEDREMAINING and USERBLOCKEDOVERDUE circulation blocks
* Updated IsMemberBlocked so that if a patron has accrued
  fine days, that will be tested for first before testing
  to see if the patron has current overdue items; this solves
  a problem introduced in the patch series for bug 4505 where
  accrued fine days would be ignored if (a) the patron has
  current overdue items but (b) the library has chosen to
  set the OverduesBlockCirc syspref to noblock.
* Now correctly assigns the USERBLOCKEDREMAINING and USERBLOCKEDOVERDUE
  blocks; prior to this patch, they had been swapped.

FIXME: IsMemberBlock ought to be split into two functions

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-03 07:46:26 -04:00
50dc9e5cf8 bug 4405 followup - fix typo
As much as circ staff may want to block circulation to
over-rude patrons, Koha probably shouldn't be trying to make
that determination on its own. :)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-01 10:39:11 -04:00
Chris Cormack
86fbe2ec21 Bug 4405 - Overdues block check out
[Documentation note by RM:

This patch adds a new system preference, OverduesBlockCirc,
that can take one of three values:

  - noblock:      checkouts permitted even if patrons
                  have overdue items (default)
  - confirmation: circ operator asked to confirm checkout
  - block:        checkouts to patrons who have overdue
                  items are forbidden

]

Squashed commit of the following:

commit 6a1f66e0686a14d8a89abfc3fe5978dabd0b7af7
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Mon Apr 26 10:27:39 2010 +1200

    Tidy up ready to send patch

commit 4d1398df18dcce4fd888cf17a0e2955fdf6ee1e4
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Mon Apr 26 10:26:15 2010 +1200

    Bug 4405 - tidy up

commit 3daeb71bc6b690e18dda96aa3c767c2bb0521038
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Mon Apr 26 10:02:04 2010 +1200

    Bug 4405 - Overdues block checkout

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-01 10:39:11 -04:00
Kyle M Hall
a1336175fd Bugfix 4123 - CanBookBeRenewed fixed.
In Circulation::CanBookBeRenewed categorycode and itemtype were not being checked for * wildcard
if a specific code was not given.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-30 08:08:41 -04:00
Ian Walls
2f4f4bdff6 Fixes bug 4326: Items marked as returned yesterday
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 23:16:31 -04:00
Chris Cormack
8478586cf1 Bug 4372 - Fix for bookcount.pl not counting started transfers as seeing an item
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 22:03:42 -04:00
Donovan Jones
593a7d8e6a Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
91990d783a additional improvement to POD for CanBookBeIssued()
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 21:03:45 -04:00
Lars Wirzenius
ea06cc504b Fix pod documentation for CanBookBeIssued method to refer to the right variable.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 21:02:20 -04:00
Lars Wirzenius
7279f55b60 Fix FSF address in directory C4/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:56 -04:00
Henri-Damien LAURENT
780cda46a2 UpdateDataBase for smart-rules modification
Members.pm :
Adding IsMemberBlocked
Circulation.pm :
Using IsMemberBlocked in order to implement finedays

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:22:21 +02:00
Henri-Damien LAURENT
3c741d2376 Smart Rules enhancements
Adding finedays and reservesallowed and renewalsallowed management in smart rules
Adding Clone Rules
Adding CanBookBeReserved and CanItemBeReserved in C4::Reserves
Manage Reservesallowed in opac and staff interface
Manage renewalsallowed in C4/Circulation.pm
Update Database follow

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:22:20 +02:00
dafb3e20da bug 3481 followup - improve CartToShelf
* added POD
* removed optional $barcode argument - in all cases,
  itemnumber is known, and we should stick with
  itemnumber when retrieving an existing item
* use ModItem to do the update so that indexer
  will know to reindex bib - otherwise, can't
  do an accurate search of items that are on
  the shelving cart.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 13:07:33 -04:00
Colin Campbell
e40e11ab0c bug 3481: Allow Item Temporary Locations for Processing and Shelving.
Allows temporary locations corresponding to 'in processing' and 'shelving'
so that newly-created items, and newly-returned items do not show
immediately as a available. Three new system preferences govern the usage
of these features.

NewItemsDefaultLocation. If system pref NewItemsDefaultLocation is set to a location code,
 all newly catalogued items will be set to the location set in this preference.
 Location code must be a valid LOC authorized value type.

InProcessingToShelvingCart. if the system pref InProcessingToShelvingCart is turned on,
any items run through returns.pl with a location code for 'PROC', will be modified to
have a new location code of 'CART'.

ReturnToShelvingCart.  If the syspref ReturnToShelvingCart is turned on,
all items returned other than confirmed holds will have a new location code of 'CART'.
Any item issued is automatically taken of the shelving cart.

Adds a cron script shelf_to_cart.pl which should be run hourly.
Updates all items with a location of CART to the item's permanent location.

The original location code is stored in the new items column 'permanent_location'.

Original Author: PTFS Contractor <dbavousett@ptfs.com>

This work co-sponsored by
  Middletown Township Public Library, Middletown, NJ USA  and
  East Brunswick Public Library, East Brunswick, NJ USA

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 11:54:46 -04:00
5593a28164 implement bailing out of AddReturn if IndependantBranches is on
If IndependantBranches is ON and user attempts to return an
item at a library other than the item's home library, bail out.
This action, which was previously just a suggestion in the code,
is now required to ensure that the item doesn't get its
holdingbranch set to the library at which the attempt to return
the item was made.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 10:05:09 -04:00
15fbaea348 bug 3409 followup - fix use of $hbr
$hbr in this context is a branch code, not an
item field.

Also added use of C4::Debug;

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 10:05:09 -04:00
b59e016612 AddReturn now always updates holdingbranch
Prior to this patch, this was done only when returning
an item after it had been out on loan.  Even if the
item had not been on loan, the fact that it was checked
in means that it is now in fact at the new holding library.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 10:05:09 -04:00
223d1fa6e8 bug 3409 follow: fix crash if holdingbranch is undef
Make _GetCircControlBranch() default to the item's home library
in the case where it otherwise would have returned the item's
holding library but that field is null.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 10:05:09 -04:00
80820af3f6 bug 3409 followup: renamed _GetCirculationBranch
New name is  _GetCircControlBranch so as not to confuse
the library that a circulation transaction is taking
place at with the library that is supposed to control
circulation policy lookup.

Also fixed formatting errors in _GetCircControlBranch.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 10:05:09 -04:00
9dec888d78 bug 3409 followup: always set holdinglibrary to library last seen at
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 10:05:09 -04:00
Henri-Damien LAURENT
b00efc7295 Bug fix 3409 : Adding an internal function to C4::Circulation
This patch add the use of CircControl and HomeOrHoldingBranch for return and transfert rules.
* ItemHomeLibrary goes to item{HomeOrHoldingBranch}
* PatronLibrary goes to the borrower library
* PickupLibrary depends where the items was checked out, and the actual library.

This add a little improvment that does not re-request each time the circcontrol syspref.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 08:24:52 -04:00
Michael Hafen
2ace8cb33d bugfix invalid comparison to ceilingDueDate in CalcDateDue()
The comparison to check the ceilingDueDate is done in the syspref format,
which isn't a good comparison.  This changes to code so the comparison is done
using iso format.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-15 09:39:04 -04:00
Galen Charlton
99afd35871 bug 3435: added missing _ in _FixAccountForLostAndReturned
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 14:36:30 -04:00
Galen Charlton
d903e7531f bug 3435 followup: tweak AddReturn cleanup
We're returning issue information when available,
not just item information.  Fixes problem where
circ/returns.pl wasn't displaying the due date
and patron when returning a loan.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:29:45 -04:00
Joe Atzberger
51e8fc2cb6 bug 3435: AddReturn overhaul.
Required for SIP checkin implementation, but also for internal correctness.
AddReturn had too many things going on, with no guarantee of data being
available for the later calls.  At some point we started tacking on all the
branch transfer logic without testing edge cases.  In particular, $borrower
is not checked to be sure it is defined, considering the item may not have been
checked out so no borrower would be associated.  That means that CircControl
of "PatronLibrary" would be inaccurate, Circ Alerts will be totally confused
(untargeted), and the Fix... subs would fail.

Note that *many* errors are still present in _FixAccountForLostAndReturned, including
those where comments are added, such that it might behave strangely even with $borrower.

Renamed the internal subs with leading underscore, per convention.  Changed
the arguments to be scalars when only scalars are needed, not entire objects.
Added depth to WrongBranch message that includes Rightbranch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:50 -04:00
Joe Atzberger
d313335cc3 Correct GetItemIssue to actually return undef if item not checked out.
Updated POD for correctness.
Replaced strftime + regexp w/ C4::Dates->today.
Also removed some sth->finish statements.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 11:15:04 -04:00
Galen Charlton
ea62d6e72f followup to AddReturn patch - fix test
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 10:15:32 -04:00
Ryan Higgins
e492747a6f Bug 2770 follwup : force AddRenewal obey circControl system preference [revised]
Also prevents infinite-length renewals by returning undef
if passed an invalid date instead of renewing with no due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-14 22:32:46 -04:00
Joe Atzberger
e8908c2f97 Returns reworking to handle empty GetItemIssue
Code cannot rely on issueinformation being populated.

Note there is room for better efficiency to have AddReturn also provide the
itemnumber (where existing) so that GetItemnumberFromBarcode is not called
at both levels.  Unfortunately there is discrepancy between this idea (for
efficiency) and the stated purpose of the $iteminformation object returned,
since $iteminformation is specifically the info from the issues table and
MUST be empty when the item was not in fact issued.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 09:44:39 -05:00
Galen Charlton
09279e2334 bug 2893: extend conditions handled by AllowNotForLoanOverride
Prior to this patch, turning AllowNotForLoanOverride on
allowed the circ operator to permit the loan of an
item who's individual not-for-loan flag was set, but did
not allow the loan of an item whose item type's not-for-loan
flag was set.  This patch extends the definition of the
system preference so that both cases are covered.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-19 06:01:27 -05:00
Galen Charlton
ea42477090 bug 3299: fix setting renewal due date explicitly
When renewing a loan from the patron details page, setting
the renewal due date now works again.  Broken by patch
for bug 2770.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 13:17:08 -05:00
Paul Poulain
6924e7d6b4 fix for 2997 : superlibrarian's ability to edit item/patron home branch affected if all other privileges are selected
Before this patch, we used to test for flags == 1, which was wrong when patron had all privileges.
This patch just adds a %2 to check that patron has superlibrarian privilege, and maybe something else we don't care.

I think I fixed it everywhere except in acquisition, that will be addressed by BibLibre new acquisition module.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 17:06:46 -05:00
Galen Charlton
6085209dd3 excised hard-coded reference to HLT
Note to Chris Cormack: I suspect the current ability
to override most circulation conditions is sufficient,
but if HLT still needs to establish a patron category
that can ignore issuingimpossible limitations, needs
to be done in a more flexible way.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 16:23:42 -05:00
Galen Charlton
5899badc3e fix to CanBookBeIssued()
Bail out if item does not exist - otherwise
subsequent checks can fail for lack of an
item branchcode.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 16:11:36 -05:00
Nahuel Angelinetti
314e818294 fix the previous patch to add a syspref that permit to choose the renewal period(day or date_due).
This patch just check the syspref and use it as base date of renew.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 15:20:09 -05:00
Nahuel Angelinetti
3587400ea7 change the date calc, to set the date_due to date_due+loanlength.
At the moment when you renew a document the date_due calculated is now+loanlength, but it's a bad thing, It should be
date_due+loanlength.
This patch do change Circulation.pm to use the date_due as renew base and add the loanlength to get the new date_due after
renewal.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 15:16:34 -05:00
Paul Poulain
d496e3111a fix for #988
When a borrower can't issue any book (issuingrules=0), the message should be
"this user can't issue book" and not "too many books already issued"wrong message

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 14:24:47 -05:00
Michael Hafen
0b50aecaf7 Tweak ceilingDueDate and CalcDateDue
This patch moves ceilingDueDate and ReturnBeforeExpiry checking into
CalcDateDue(), so the renewal due date is also calculated with those.

Also restores a check in CanBookBeIssued.  If the due date isn't given
call CalcDateDue and make sure it's not in the past.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 09:03:21 -05:00
Ryan Higgins
fa848a66f0 Bug 3179: Typo in C4::Circulation function call causes fatal error
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:15 -05:00
Nahuel ANGELINETTI
632955332d (bug #2750) Cannot return to another branch if the independantbranch option is set as ON
The code was modified to change the holding branch ONLY if the return to the right branch is done. If you set IndependantBranch to on, you must return the document to the HomeBranch.
And verify the return is done before show the message that allow to transfert the document to another branch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-28 06:43:49 -05:00
Nahuel ANGELINETTI
43e4976806 (bug #2893) Allow loan forcing if a syspref is set
If the syspref 'AllowNotForLoanOverride'(YESNO) is set to YES, the librarian is able to force a loan on an item set as "not for
loan".
If the item is not for loan and the syspref is set to YES, koha will ask to the librarian if he really want to check-out it, else
do nothing.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 14:29:30 -05:00
Mason James
866df9ce97 BUG-3160: fixes 'itemlost' check on item return.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 20:41:53 -05:00
Michael Hafen
7d61fd62f5 New feature ceiling Due Date.
This adds a feature and system preference: ceilingDueDate.  If this is
set to a valid ( according to dateformat syspref ) date, then calculated
due dates will be less than this date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 12:49:54 -05:00
Galen Charlton
684cea4309 bug 3049: display correct due date of renewed loans
The intranet item display provided by moredetail.pl
would display the original due date of the item, and
would thus be incorrect if the item had been renewed
and got a different due date.

The incorrect date was coming from items.onloan,
which AddIssue() sets to the due date.  This patch
fixes the bug in two ways:

[1] AddRenewal() now updates items.onloan with the
    correct due date.
[2] Two templates were updated to display the
    due date from (indirectly) issues.date_due
    instead of items.onloan, thus making it less
    likely that the wrong value will be displayed.

This patch does *not* update items.onloan to reflect
the correct due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 14:51:32 -05:00
koha
9c72711a2c This patch allows the Branch Transfer Limits feature to limit transfers either by itemtype ( like the original commit ) or collection code ( new feature ).
[Note inserted by RM: this patch is by Kyle Hall]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 11:27:16 -06:00
Mason James
41cb983c3b fix for bug-2923, corrects renew status in SCO
- removes unneeded  HTML::Template::Pro
 - some indent/newline tidies

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 16:28:17 -06:00
John Beppu
b0ed658d3b bug 341: Use the Right Branch
When sending circulation alerts, use the branch that the
event happened on instead of $item->{homebranch}.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 14:00:46 -06:00
John Beppu
062bb9a804 bug 324: Setting to_address
- Enqueue the messages with a to_address.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 14:00:18 -06:00
John Beppu
39d0ed3635 Perl Modules
- C4::Letters:EnqueueLetter() is aware of new fields in message_queue table
- C4::Circulation::SendCirculationAlert() actually works
- C4::Category cleanup
- C4::ItemType cleanup
- C4::Message is a new module.
  It presents yet another way to interact with the message_queue.
  You can now take messages that have already been queued and modify
  their contents before they're sent out.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:58:03 -06:00
John Beppu
02fe630873 Sending Circulation Alerts part 1
- Added code to AddIssue to send an alert when appropriate.
- Added code to AddReturn to send an alert when appropriate.
- Added a sub called SendCirculationAlert() that DOESN'T ACTUALLY WORK YET.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:56:20 -06:00
Jesse Weaver
1301705150 Add holds policies
This adds holds policy creation support to smart rules and read support to
C4/Circulation.pm, and the two reservation pages. It also adds a system
preference, AllowHoldPolicyOverride, to control whether the staff can override
these policies.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-16 08:21:07 -06:00
Joe Atzberger
9dbd65da27 barcodedecode() did not always return barcode
This patch amends the function to return barcode, in particular when
filter is not defined.  It also adds an optional 2nd argument to
allow the filter to be specified by caller, enabling testing.

Non-DB-dependent test script included.  Note: T-prefix style
barcode filter is not documented, and drops the first nonzero
digit after the T.  This seems mistaken, but is not corrected here
to avoid any surprises.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 15:55:14 -06:00
Joe Atzberger (siptest
76309ae328 Allow AddIssue to log SIP transactions distinct from others.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 15:43:12 -06:00
Kyle Hall
9cf0472903 Added 'Branch Transfer Limits' Feature requested by Geauga County Library System.
Added syspref to updatedatabase.

Updated kohastructure.sql with the limits table.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-17 14:49:02 -06:00
Galen Charlton
5f18793461 bug 2758: don't confirm checkout if fine balance is 0
Fixes problem where if the IssuingInProcess preference is ON,
the operator is always required to confirm a checkout if
the patron has had any fine transactions at all, even if
the patron's balance is 0.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-02 16:44:20 -06:00
Galen Charlton
3ad41dbaf8 followup 1 to to renewal limit override
Update POD for CanBookBeRenewed().

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 10:34:56 -05:00
Michael Hafen
03d8521cbf Allow renewal limits to be overridden
Originally by Jesse Weaver <jesse.weaver@liblime.com>

This patch creates a new system preference, AllowRenewalLimitOverride,
that, if YES, allows the renewal limit to be manually overridden. It
updates C4::Circulation and reserve/renewscript.pl to obey this.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 10:34:50 -05:00
Joe Atzberger (siptest
b165e9802f Fully qualify function call.
This is a pre-requisite to continued SIP processing, dealing with some
arcana related to recursive dependencies and UNIVERSAL.  The reason this
is separate from other SIP patches is that it is expected patched in other
submissions already.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-13 12:05:52 -05:00
Joe Atzberger (siptest
bd0ef37c24 Bugs 2541 and 2587 - AddIssue must return date object as intended.
SIP actually relied on the AddIssue return that was not reliable.
AddRenew also updated to return C4::Dates object for datedue.

Please note, any running SIPServer will have to be restarted
*immediately* after applying this patch, because although Koha
C4 behaves as normal, the SIP server runs as a Net::Server with
components cached.  Changes will not be applied until SIPServer
restarts, and so checkout actions may fail until then.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-11 08:06:04 -05:00
Galen Charlton
69781fbe8b bug 2582 [1/2]: don't set issuedate during renewal
Changed so that issues.issuedate is never modified
during a renewal, since that column records the original
date of the loan.  Changed the name and interpretation
of the $issuedate parameter of AddRenewal() to
$lastreneweddate, allowing (e.g.) offline circulation
to set the date of the renewal without changing the
issue date.

As a result of the original bug, issues.issuedate can be
set to NULL for loans that were renewed via the OPAC,
self checkout, or the staff interface when explicitly
renewing a loan.  Loans that were renewed by checking
the item out to the same patron will have the issue date
changed to the date of the last renewal.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-04 20:11:25 -05:00
Galen Charlton
b31859946b bug 2552: correct issue history display
The loan history for a bib can be incorrect if the bib's
biblioitemnumber is not the same as its biblionumber.
This was due to a bad join in GetBiblioIssues().

Credit to Michael Hafen for patching a similar bug,
which inspired me to check for other bad joins.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-27 09:46:38 -05:00
Andrew Moore
3d323db1fe bug 2503: removing Force* subs and replacing them with calls to C4::Circulation subs
The offline circulation file processor originally used its own methods to
insert circulation data. This patch takes advantage of the updated
C4::Circulation methods that allow us to specify dates in the past.
This makes the offline circulation file processor use C4::Circulation
functions instead of its own and removes the deprecated subs.

moving from ForceIssue to AddIssue
replacing ForceRenewal with AddRenewal
moving from ForceReturn to MarkIssueReturned
removing deprecated Force* subs
fixing a few bugs in process_koc.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Andrew Moore
1de1e05e23 bug 2503: adding dates to some C4:Circulation methods to allow offline circulation tool to specify dates other than today
When uploading an offline circulation file, some actions may need to take place
in the past. This patch adds date parameters to some C4::Circulation methods
to allow us to set dates on them

added issuedate to C4::Circulation::AddIssue
adding issuedate to C4::Circulation::AddRenewal
adding returdate to C4::Circulation::MarkIssueReturned

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Andrew Moore
816594bb7b bug 2503: documentation improvements in C4::Circulation
These are some documentation changes that I made to C4::Circulation as
I was writing tests for it.

moved around the docs for CanBookBeIssued. It was in the wrong spot in the file.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Kyle Hall
38cf1fd318 Integrated version of the Koha Offline Circulation file uploader. It needs some testing and cleanup, but it works.
Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 17:05:24 -05:00
Galen Charlton
80a7d712aa bug 2518: remove useless patron and branch lookups
AddIssue does not use the results of the lookup
of the patron whose hold request was preempted
by the issue.  This patch now leaves a no-op in
the '$restype eq "Waiting"' test, but I'm not going to
refactor the hold cancellation logic now.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:24 -05:00
Jesse Weaver
1157ed9457 fix for bug 1551: Renewing doesn't move item...
This makes C4::Circulation::AddRenewal update lastreneweddate, then has circulation.pl check today's date against issuedate or lastreneweddate. It also cl
eans up a little parenthesis spacing.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-16 18:26:16 -05:00
Joe Atzberger (siptest
3e7013d174 Bugfix Circulation, Expand ILS::Patron mapping.
ILS::Patron is where most of the intelligence for SIP's representation
is lodged.  Currently there is difficulty with C4::Members functions.
GetMemberDetails is required for the needed flags, but it returns
empty structure on bad barcodes, where it should be undef.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:45:29 -05:00
Galen Charlton
c80b328aae clean up old-style calls to GetMemberDetails
GetMemberDetails() returns only one hashref now,
not two.  In all cases where the caller was
expecting two output values, the $flags return
was ignored anyway.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:22 -05:00
Joshua Ferraro
56baa50ead fix for bug 1961: sprintf value needed in C4/Circulation.pm 2008-06-20 17:04:27 -05:00
Andrew Moore
2cae4efa0a Bug 2176 (3/5): adding methods to manage message_queue, new advance_notices.pl, new C4::SMS module
I've added methods to to C4::Letters to manage the database table
message_queue. This will let us keep track of messages sent
via email, sms, and rss to patrons. That way, we can show the history,
deal with failures, and reconstruct an RSS feed when needed.

misc/cronjobs/overduenotics.pl has been added. It prepares advance notices
and item due notices and stages messages to be sent in the message_queue
table.

C4::Overdues::Getoverdues now takes two optional arguments to tell it how
old of overdues to fetch.

Also, a C4::Circualtion::getUpcomingDueIssues method was added that
advance_notices.pl uses.

misc/cronjobs/process_message_queue.pl has been added. It sends the email
or SMS messages out of the message queue.

The C4::SMS module didn't work at all, and it has been rebuilt to use
an external perl module from CPAN, SMS::Send.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 13:04:52 -05:00
Galen Charlton
211defee52 bug 2000 - changes to TooMany()
The C4::Circulation::TooMany() function, which determines
if a patron is at the maximum loan limit, has been
changed to work as follows:

1. Checks the issuing rule that would apply to the
   prospective loan to see if a loan limit (maxissueqty)
   has been set.
2. Counts the number of loans that the patron has
   that would fall under that loan rule.

IMPORTANT: that means that if a specific loan rule
exists for the branch, patron category, and item type
in question, *only* that rule's maxissueqty will be
checked here - it will not go on to check whether
a less specific rule has a lower loan limit.

3. If adding one more loan would bring that count
   over the limit, returns a "too many" error.
4. If the loan hasn't exceeded a specific limit, checks
   whether a branch/patron category circ rule has
   specified a loan limit, regardless of item type.
   If the patron has already reached *that* limit, returns
   the "too many" error.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 08:19:08 -05:00
Galen Charlton
95889857c7 bug 2000 - add C4::Circulation::GetBranchBorrowerCircRule
This routine retrieves the branch/patron category circulation
rules for a given branch and patron category.  The return
value is a hashref containing the following key:

maxissueqty - maximum number of loans across all item types

This will first check for a specific branch and
category match from branch_borrower_circ_rules.

If no rule is found, it will then check default_branch_circ_rules
(same branch, default category).  If no rule is found,
it will then check default_borrower_circ_rules (default
branch, same category), then failing that, default_circ_rules
(default branch, default category).

If no rule has been found in the database, it will default to
the built in rule:

maxissueqty - undef

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 08:19:06 -05:00
Galen Charlton
9f2c77a686 bug 2000 - fix order of issuingrule lookup
Extended help on the alternate circulation rules
form to list the order of issuingrules lookup as
follows:

same library, same patron type, same item type</li>
same library, same patron type, default item type</li>
same library, default patron type, same item type</li>
same library, default patron type, default item type</li>
default library, same patron type, same item type</li>
default library, same patron type, default item type</li>
default library, default patron type, same item type</li>
default library, default patron type, default item type</li>

This includes modifying two routines in C4::Circulation to
follow this order: GetLoanLength() and GetIssuingRule().

The reason for this change is to have Koha exhaust all issuingrules
possibilities for a branch before checking the rules for
the default branch - this is consistent with what an admin
might expect from looking at the issuingrules forms, which display
settings a branch at a time, and is more consistent with how
circulation rules should work for indepdendent branches.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 08:19:03 -05:00
Joe Atzberger
97659a73ca FIXME added to note discrepancy.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-31 21:59:38 -05:00
Paul POULAIN
7ff55f6c40 BUGFIX issuingrules : total for all itemtype was not properly calculated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 14:01:11 -05:00
Joe Atzberger
dca0e73aed Correct number of args to getnextacctno.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:35 -05:00
Ryan Higgins
302da68ce5 Fill statistics table properly for renewals; and issue->checkout, return->checkin
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 07:33:30 -05:00
Ryan Higgins
b54401ac66 C4::Circulation::FixOverduesOnReturn now handles dropbox mode.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:14 -05:00
Ryan Higgins
97f8b3abff Make dropbox mode obey Calendar module according to CircControl branch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:13 -05:00
Ryan Higgins
bd30b60a8a Alter itemBarcodeInputFilter T-Prefix.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 07:03:53 -05:00
Ryan Higgins
12a3217bfe Add dropbox mode to return.pl. Small API change to allow setting
returndate other than now().  Overdues will be handled in a forthcoming commit.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 17:54:20 -05:00
paul
0bf436a0ea use HomeOrHoldingBranch to determine if a return is valid or not
in fact, i'm not 100% sure of this bugfix : I don't see the case where a return should be done directly to homebranch, when the check out has been done at holdingbranch
so maybe we could hardcode 'holdingbranch' instead of using HomeOrHoldingBranch

the patch as written won't break anything existing.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:52:49 -05:00
Joe Atzberger
42e81b4cdb AddRenewal - handle opac-renewal, empty branch arg.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 19:49:17 -05:00
Joe Atzberger
d1601b26a6 Quell 7 warnings: "my" variable $irule masks earlier declaration in same scope.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 17:00:03 -05:00
Ryan Higgins
600d479f4e Add a working fines script, some changes to CalcFine and Circulation.pm
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:59:54 -05:00
paul
685e9c182d BUGFIX renewal
otherwise, the new issuedate will be empty

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:56:24 -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
Galen Charlton
087f31062d fix initiation of transfer on return of non-issued item
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:37:20 -05:00
Galen Charlton
6e01d8ca9f fix crash when levying a rental charge
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:37:11 -05:00
Galen Charlton
3102fab410 check on max renewals now respects item-level item types
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:37:08 -05:00
Galen Charlton
0c156b1ef3 removed warns
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:36:40 -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
Ryan Higgins
bd8f90387b Add Local-use statistical patron category_type
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-10 05:27:37 -05:00
Ryan Higgins
542da50713 Reinstating use of C4::Calendar object on issuing.
Also implementing  useDaysMode syspref 3 modes:
  Calendar: every 'closed' day increments loan length by one.
  Days: ignore the calendar when calculating loan length.
  Datedue: increase loan length only to prevent due date from falling on 'closed' date.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-28 18:54:37 -06:00
Galen Charlton
456e179f1b circ: fix use of CircControl; staff user branch
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-28 07:59:04 -06:00
c43eadf3c7 Fix for bug 1908
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-28 07:58:46 -06:00
Ryan Higgins
1cd6263dde Adding barcode_decode syspref
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-19 20:22:01 -06:00
Chris Cormack
c3c47af750 Fix for renewals not working at circulation
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-18 21:42:27 -06:00
Chris Cormack
86716641ca Bug, using branchcode instead of branch
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-23 21:27:27 -06:00
Paul POULAIN
07210c5508 moving a misplaced * to fix a bug in issuingrules
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-20 10:17:57 -06:00
Chris Cormack
23996c7864 Fixing a bug that meant you had to have totals defined for
branch/itemtype/category in issuingrules, or TooMany would always fail

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-20 10:17:55 -06:00
Paul POULAIN
743caa04fa A book can be renewed if renewalsallowed > to renewals done, not >=
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-14 16:46:27 -06:00
Joe Atzberger
faf223b8bd Circulation.pm - cleanup, clarification of HLT-specific behavior. Please confirm HLT-specific code is still needed and OK.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-09 14:49:52 -06:00
Chris Cormack
ef6b767117 Changing CanBookBeRenewed to pass back the reason a renewal cannot proceed
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 16:13:20 -06:00
Henri-Damien LAURENT
c85458a33e BugFix for Circulation
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:07:20 -06:00
Joe Atzberger
d2a2f31027 Circulation.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:26 -06:00
Galen Charlton
2cb5a9e32e C4::Circulation - ensure that certain modules always get imported
For some reason currently unclear to me, a use 'C4::XXX' does
not seem to guarantee that the contents of C4::XXX's
@EXPORT gets imported into C4::Circulation's symbol table.

Added an INIT block to ensure that this gets done as
part of runtime initialization.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 20:24:09 -06:00
Galen Charlton
4252673d6c removed more redundant 'my' causing variable masking warnings
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:49 -06:00
Galen Charlton
35f8f65b41 item rework: replace direct SQL update of items
with ModItem calls

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:38 -06:00
Galen Charlton
bc9ee0cff9 item rework: moved ModItemInMarc
* Moved exported ModItemInMarc from C4::Biblio to
  C4::Items and renamed to _replace_item_field_in_biblio.
  Function is now private and is not exported, as
  ModItem is now the sole entry point for updating
  an item record.
* Replaced calls to ModItemInMarc in C4::Circulation
  with appropriate ModItem calls.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:23:23 -06:00
Galen Charlton
c6c8e80a73 start of BIB change -- introduce C4::Items
Introduced C4::Items module to separate items API
from biblio API.  Details on changes will be
put in later commit messages.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:23:12 -06:00
Chris Cormack
3bccf02a66 Fix for bug 1711
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 17:43:42 -06:00
Chris Cormack
0a8fcfe53a Fix for item level itypes and toomany subroutine
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 15:13:05 -06:00
Chris Cormack
f1f54790dc Fixing a bug with notforloan being checked properly
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:07:59 -06:00
Chris Cormack
87327eae60 Fix for bug 1689
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:07:57 -06:00
Chris Cormack
966d90e609 Get biblioitem data in canbookbeissued, we need this for biblioitem level
itemtypes, to check for notforloan

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:07:56 -06:00
Chris Cormack
358ec9c6c3 Fix for 1582, if independent branches is on, you cant return to
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-27 17:24:37 -06:00
Ryan Higgins
a9d03af6dc adding 'exempt fine on return' option.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-27 17:22:45 -06:00
Chris Cormack
7d6282e513 Fix for 1704, now if autoitemreturns is off you get a dialogue warning a
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-27 17:22:00 -06:00
Joshua Ferraro
2143002750 IMPORTANT: BUGFIXING STATUSES
Major bugfixes:
* Circulation status in moredetail.pl now correctly displays On loan
status and Date due
* Bugfixes on Status column in detail.pl
   * Removed hard-coded English strings from status column in detail.pl
      * Added missing auth values for lost and damaged statuses, sane
defaults if those auth
     values don't exist
        * Added missing 'On hold' status and 'Hold waiting' status
display

Medium bugfixes:
* Now correctly shows itemtype at level specified in systempreference
* Uses itemtypeimage for display, image title is full itemtype
description

* Fixed Location column concatenation between branchname location and
itemcallnumber
  * broke out Location (branch), Collection (items.location)
      Call Number (itemcallnumber) into their own columns
        * Added auth value display for items.location

	Minor fixes:
	* detail.pl didn't show dates correctly
	* nomenclature s/Checked out/On loan/ in opac-detail.tmpl
	* s/Book/Item/ in my $desc="Item Returned
".$iteminfo->{'barcode'}; in Circulation.pm
* request.tmpl: s/date_due/onloan/ to display date due
* Fixed SimilarItems, XISBNSimilarItems

NOTE: Needs to be ported to OPAC

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-24 13:34:44 -06:00
Galen Charlton
875f4552be circ: do not crash when 'returning' item that was not issued
When attempting to return an item that was not actually
on loan, would crash because GetItemIssue did not return
biblionumber in hash.  Add call to get biblionumber
directly.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-22 20:09:29 -06:00
Chris Cormack
d9cfae182f Fix to update onloan to 0 even if the item isnt out to a borrower
Bug 1681

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 19:13:42 -06:00
Chris Cormack
6cfe88b7b2 Fix for bug 1427
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-19 18:55:20 -06:00
Chris Cormack
27cd17cb79 Fix so item.renewals is updated by a renewal, and a zebraop is triggered
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-18 16:39:16 -06:00
Chris Cormack
ea7cbfff43 Fix for bug 1648, specifying a due date resulted in a blank due date
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-17 08:19:55 -06:00
Joe Atzberger
ab4ccf8ac1 Circulation.pm - Bugfix invalid constructor calls to Dates (single digit Mon. and Day)
See Bug #1647

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-14 10:04:37 -06:00
Joe Atzberger
8cae12b9e7 Circulation.pm - remove Date.pm dependency.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-12 07:50:58 -06:00
Chris Cormack
54e6cf71e3 Fix for renewing
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-02 17:26:28 -06:00
Chris Cormack
432fbaed04 Fix for bug 1613 making sure the zebraqueue is updated when an item is
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-02 14:12:38 -06:00
Joshua Ferraro
52d9e90655 adding back count of remaining renewals to OPAC
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:27:57 -06:00
Ryan Higgins
cb1ec158c0 Adding calendar widget to circulation/stickyduedate
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-20 16:27:25 -06:00
Paul POULAIN
d8996cdff8 Loan length fixes (default branch is now '*', not '')
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-20 16:21:28 -06:00
Chris Cormack
7934f95494 Adding a system preference to choose whether a homebranch or a holdingbranch is used to check against for independentbranches
Changing GanBookBeIssued to use this systempreference
Set to homebranch by default Paul and others you might want to switch this to holdingbranch to get the behaviour you are used to

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-13 15:30:38 -06:00
Chris Cormack
31b321b36b Fixing a bug that was causing a charge to be added twice if renewing in circulation
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-13 11:19:25 -06:00
Ryan Higgins
3967fa9c79 further mods to change from ccode to itype at item-level itypes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-11 18:40:20 -06:00
Ryan Higgins
805d8c8f4d changes to item-level itype reintroduce items.itype (had been removed by updatedatabase but still in kohastructure) populate itype with bi.itemtype. fix error in getbiblio
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-11 18:40:04 -06:00
Chris Cormack
141cdbb3a3 Can check an item out now
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-06 06:33:08 -06:00
Ryan Higgins
f4a62da0e9 fix typos on syspref.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-04 16:38:04 -06:00
Ryan Higgins
371efb047b adding item-level itypes: based on systempref: item-level_itypes, we use items.ccode as the circ code rather than biblioitems.itemtype. This is initial commit -- still requiring interface changes basic loanlength, maxissues should be by ccode now.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-04 16:37:53 -06:00
Ryan Higgins
3c9d0371fe item-level itemtypes issuingrules require some testing.
based on syspref 'item-level_itypes', add an itype col to items table
for 3.2 itype's type will change from varchar(10) to int to allow
circ type definitions per agency.
Note that updatedatabase doesn't populate items.itype, just creates column.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-04 16:28:17 -06:00
Ryan Higgins
060e95fab1 Small change to begin item-level itypes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-04 16:27:43 -06:00
Chris Cormack
b9c20fa9cf Patch from Galen Charlton, removing $Id$ $Log$ and $Revision$ from files
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 20:22:01 -05:00
Henri-Damien LAURENT
95d6452462 Adding some more information on issuehistory.
Adding itemnumber to issuehistory.pl API
so that one could search for issuehistory of a specific item.
(Useful for IndependantBranches)

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 19:41:37 -05:00
Paul POULAIN
ef27099d90 #1485 (issuing rules improvement) continued
issuing rules are working as expeced with this commit.
working on finesrules now

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-12 22:22:37 -05:00
Henri-Damien LAURENT
4f54ed3792 bug fixing : 1459 + fixing a jserror in basket.tmpl
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-11 15:55:18 -05:00
Paul POULAIN
94a441f57e #1485 saving issuingrules
lot of bugs to fix...
- a foreign key on patron category is stupid as we have a wildcard
- having a wildcard on itemtype is useless, removing it in template
- reindenting & removing some commented lines
- fixing some SQL bugs (insert/update lines)

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-11 11:56:10 -05:00
Paul POULAIN
47321d0068 Adding dates for display to circulation.pl Minor bug fixes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-09 18:44:46 -05:00
Joshua Ferraro
464b0e25e7 Revert "#1485 saving issuingrules"
This reverts commit 31eaffcb04.
2007-10-08 16:20:47 -05:00
Paul POULAIN
31eaffcb04 #1485 saving issuingrules
lot of bugs to fix...
- a foreign key on patron category is stupid as we have a wildcard
- having a wildcard on itemtype is useless, removing it in template
- reindenting & removing some commented lines
- fixing some SQL bugs (insert/update lines)

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-08 15:52:52 -05:00
Paul POULAIN
7ec8571d88 #668 cancel reserve on checkout does not work
The reserve was cancelled only under certain circumstances (depending on reserve status)
cancelling everytime.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-08 15:51:03 -05:00
Paul POULAIN
3033e2ff7e #1459 yadc : Yet Another Date::Calc problem...
if dateexpiry is empty, set issuingimpossible without any calculation

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-05 19:46:46 -05:00
Henri-Damien LAURENT
04a108482d BUG FIXING : Using LEFT JOIN in replacement of implicit inner joins. WARN NOT FULLY TESTED
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-03 14:58:35 -05:00
Joshua Ferraro
06d8e7d4cf chmod 644 on all modules
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-02 19:11:35 -05:00
Paul POULAIN
159187adf4 BUGFIX : no need to load a package twice
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-18 15:06:18 -05:00
Paul POULAIN
d832c88462 BUGFIX : ModReserveStatus can't be found if you don't specify full path
this is a workaround, and could hide another problem.
However, I haven't found ModReserveStatus problem or duplicate definition.

Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-18 15:06:02 -05:00
toins
a3135df486 really minor change : POD fixing, indentation & some compilation warn removing. 2007-07-26 15:18:46 +00:00
btoumi
9395334e69 add control of 'return date' if it 's a special or repeatable holidays , and return a right return date
(renewal)
2007-07-25 14:09:39 +00:00
toins
6ec59c52b9 using 'our' instead of 'use vars' which is deprecated.
removing some compilation warns.
2007-07-12 15:22:09 +00:00
rangi
ba52d15f7b Making transferbook update the last seen date of the item transfered 2007-07-01 23:56:43 +00:00
tipaul
a0ca85b917 BugFixing CanBookBeRenewed was too strict. If a book could be renewed 1 time, it wouldnot do. 2007-05-30 09:12:36 +00:00
tipaul
67d1dcf1f7 various bugfixes (minor) and french translation updated 2007-05-23 16:19:40 +00:00
tipaul
5ff7fcffa4 Bugfixes & improvements (various and minor) :
- updating templates to have tmpl_process3.pl running without any errors
- adding a drupal-like css for prog templates (with 3 small images)
- fixing some bugs in circulation & other scripts
- updating french translation
- fixing some typos in templates
2007-05-22 09:13:54 +00:00
btoumi
a80a0a7edc bug fix: add call of two function from Date::calc
and  correction of wrong   variable name
2007-05-18 12:30:27 +00:00
btoumi
c49fb53a45 add security for the item barcode 2007-05-11 14:49:54 +00:00
btoumi
a6db242492 add control of 'return date' if it 's a special or repeatable holidays , and return a right return date 2007-05-10 15:56:53 +00:00
hdl
506c2e8972 Deleting Sub GetBorrowerIssues. 2007-04-25 14:09:10 +00:00
hdl
a171035f1d GetBorrowerIssues is deleted from C4::Circulation
Use GetPendingIssues from C4::Members instead.
2007-04-25 14:07:34 +00:00
tipaul
fb143b71ba BIG COMMIT : cleaning of Reserves.pm. See detail on koha-devel 2007-04-24 16:10:36 +00:00
tipaul
4dea4d29b3 moving dotransfer to Biblio.pm::ModItemTransfer + some CheckReserves fixes 2007-04-24 09:07:53 +00:00
tipaul
9f42b8ad49 renaming currenttransfers to transferstoreceive 2007-04-23 15:21:17 +00:00
tipaul
3ddec89262 moving Reserves2.pm to Reserves.pm 2007-04-23 14:08:47 +00:00
tipaul
111d590e9c reintroducing fixaccountforlostandreturned as requested by rosalie 2007-04-23 13:17:52 +00:00
hdl
0b66bd800d Code Cleaning Members.
- checkaccount and getborraccountno => GetBorrowerAcctRecord

Many changes in names,
some changes in function signature.
Will be detailed in a mail to kohadevel.
2007-04-23 13:10:07 +00:00
tipaul
7bd99ef365 removing all useless %env / $env 2007-04-18 17:00:14 +00:00
tipaul
43ad7fb4df circulation cleaning continued: working on branchtransfers.pl (unfinished, but at least it compiles... 2007-04-17 16:24:59 +00:00
tipaul
b71839d85c circulation cleaning continued: bufixing 2007-04-17 08:44:49 +00:00
hdl
e86eb18b40 Adding Circulation and Overdues modules 2007-04-05 08:53:31 +00:00
tipaul
b5113b8e5b unsued package. beginning code cleaning 2004-03-04 15:39:41 +00:00
slef
76dc65f2ca DBI fixes as part of bug 662 2003-12-03 11:43:12 +00:00
arensb
fddab26c2e Deleted unused variables.
Removed trailing whitespace.
2002-10-13 08:27:49 +00:00
arensb
118907bcdd Added some FIXME comments.
Added RCS magic comment.
Removed unused finalizer.
2002-10-13 06:03:03 +00:00
arensb
cd8203d8d8 Added FIXME comment. This file is obsolete, right? 2002-10-11 12:36:44 +00:00
arensb
dbca39823f Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
2002-10-05 09:44:27 +00:00
arensb
048d545d11 Added some FIXME comments, mostly marking duplicate functions. 2002-10-01 11:48:51 +00:00
tonnesen
1e67687742 Added copyright statement to all .pl and .pm files 2002-08-14 18:12:50 +00:00
tonnesen
6897cec04d Most of these merges are just removing unused parts of the perl modules. 2002-06-20 18:56:52 +00:00
rangi
d0374d0037 Initial revision 2000-12-19 23:45:51 +00:00