Commit graph

257 commits

Author SHA1 Message Date
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