Commit graph

388 commits

Author SHA1 Message Date
Sébastien Hinderer
f1f833c965 bug 3464: Takes columns country and B_country of table borrowers into account in related operations.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 18:19:20 -04:00
PTFS Contractor
36ec435cd9 bug 3485: Clear Borrower record after checkout.
Button added to clear the last Borrower record after transaction is complete
To enable, turn on the syspref DisplayClearScreenButton.

This work was sponsored by Middletown Township Public Library, Middletown, NJ USA

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 13:21:21 -04:00
8219d79f5a cosmetic fix - use $itemnumber as argument to GetItems when available
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 13:07:32 -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
Garry Collum
10816a8b33 Bug 2505: Enables warnings in reserveratios.pl
Also fixes resulting warnings.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-20 21:01:08 -04:00
Darrell Ulm
1b879d7410 Bug#: 3358 File 1 of 3 patch for reserve notes (show)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-12 23:33:38 -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
Jane Wagner
a13c0db0c9 Bug # 2368 Change holds to pull default date range
Delivered range was 10 years ago to yesterday; changed default
to be two days ago to today.  Also removed notes field from report
output; 5xx fields can be quite large and including them in the
display resulted in a very lengthy printout for staff.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 08:55:11 -05:00
Galen Charlton
568f9d8c42 followup: remove unconditional warn
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:39:13 -05:00
Joe Atzberger
5d15edd869 Standalone branch selection
selectbranchprinter now posts to itself to set the branch.  That also means that
other pages can set the branch by linking to selectbranchprinter like:
    /cgi-bin/koha/circ/selectbranchprinter.pl?branch=MAIN

We use HTTP_REFERER to allow the user to continue back to wherever they linked from,
defaulting to circulation.pl (the former POST target).

Note that all "branchprinter" functions are basically useless as the data is not
properly handled in the session storage.  Chris C. expects this to be addressed
with later patches for HLT.  There appear to be no 3.0 users of this intended
functionality yet.

Includes squashed patch to fix tmpl and to automatically redirect if there are no
POST params to be recycled.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:33:17 -05:00
Joe Atzberger
4677ae7390 Cleanup selectbranchprinter.pl and .tmpl
Use GetBranchesLoop and warnings.  Remove unused code.  Moved the Get's to after auth.
I begin to show how this script will use referer to redirect back to the sending
page upon successful change of branch or printer (see hidden div and recycle_loop).

Indicator for singleBranchMode added.
Also added another helper function for GetBranchesLoop, namely mybranch.  This
encapsulates the logic for finding an intelligent default selection, which is
almost always desirable.

This does not resolve bug 2426, but is work in that direction.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:30:52 -05:00
Galen Charlton
ab44e2986a bug 2866: Overdues Reports - Upgrading to filter by patron extended attributes
Patch by Rick Welykochy <rick@praxis.com.au> with some squashing
by me.

Bug Report: 2866 Filtering and sorting the overdue report using patron attributes

1. Create a new system preference ?FilterBeforeOverdueReport?
2. Option to filter *before* the overdue report runs, avoiding report slowness
3. Add searchable patron attributes to the list of overdue report filters
4. Add searchable patron attributes to the sort fields on the overdue report
5. add item call number and replacement price
6. the CSV download link now returns the same
   data as the web report, rather than (inconsistently)
   trying to run the overdue_notices.pl batch job
7. always run report if requesting CSV
8. barcodes are now links
9. use item-level item type for overdue itemtype filter

Included is a new callback for searching patron attributes, similar
to circ/ysearch.pl.

The following additional bugs are fixed:

2748: Nothing is output to the .csv file for the "Overdues" circulation report

This is fixed by having circ/overdues.pl produce the CSV output directly instead
of trying to call the overdues cronjob.  The CSV output includes all of the fields
that are displayed on the web table plus the item replacement price and any extended
patron attributes.

2836: overdues.csv may contain HTML
2837: Descending sort doesn't descend on the overdues report plus other probs with report

This enhancement was sponsored by the Plano Independent School District.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 19:20:36 -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
Joe Atzberger
f58b8916df Cleanup circulation.pl
Removed many unused variables.
Switched to elsif where appropriate.
Cleaned up some whitespace.
Corrected comments.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 07:33:03 -05:00
Joe Atzberger
8c0ac886bf Cleanup waitingreserves.pl and .tmpl
Use warnings and provide fallback values to avoid them.
Move waitingdate check up to top of loop.
Move $today creation outside loop (should be same for all).
Remove unused and unnecessary variables.
Add subtitle escaping to .tmpl and slightly standardize formatting.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 07:25:14 -05:00
Joe Atzberger
85b09f8d0e Cleanup view_holdsqueue.pl and .tmpl (minor)
Convert to GetBranchesLoop.
Insert template message to display for ALL libraries search, so that the
message is n0t truncated like "X items found for".

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 06:55:49 -05:00
Galen Charlton
1e6ae8e650 minor fix - don't declare variables in a conditional
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 06:53:55 -05:00
Joe Atzberger
b83ee6b483 Cleanup branchtransfers
Remove unused sub and variables.
Convert to using GetBranchesLoop instead of local code.
Use elsif where appropriate.
Added fallback values and enabled warnings.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 06:46:52 -05:00
Joe Atzberger
3c9ed58cba Cleanup transferstoreceive.pl and .tmpl
Removed unused variables.  Replaced EXPR.
Inserted hidden span to correct tablesorter behavior on title field.  Without this patch
because of the link href in the cell, the sort would end up being effectively on
biblionumber, not title.

Mostly whitespace edits in template.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 06:43:17 -05:00
Joe Atzberger
26a18d3d0d Cleanup circ/overdue.pl
This also fixes a deficiency with overdue.tmpl not retaining the
user's selection of sort order when displaying results.
Removed 9 unused variables.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:55:45 -05:00
Joe Atzberger
9620e07f15 Cleanup circ/billing.pl
Remove ton of unused variables.
Remove wrong use of BiblioDefaultView on INTRANET side.
Consolidate failover values.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 07:24:43 -05:00
Joe Atzberger
dd611563a9 Cleanup circ/stats.pl
Use elsif and else.  FIXME's added.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 06:50:25 -05:00
Joe Atzberger
ce4c8c5b1e More cleanup on returns.pl
Removed unused variable.  Corrected comments.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 08:22:34 -05:00
Joe Atzberger
3c76a8334f Cleanup and enhance bookcount.pl and .tmpl
Eliminated bug with date handling outputting an English string.
Row striping added.  Highlight for "my branch" row added.
GetBranchesLoop used instead of recreating data structure, so we get the
benefit of branches being sorted (by display name).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 08:18:01 -05:00
Joe Atzberger
89391ca831 Cleanup returns, consolidate some repeated logic.
Use one $userenv_branch instead of many calls to C4::Context->userenv->{'branch'}
for comparisons.  Script is not warnings safe yet, but getting closer.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-20 08:41:18 -05:00
Daniel Sweeney
415d5ac3bb Added barcode query back to circ/ysearch.pl for patron proxies.
This is to allow patron proxy relationships to be built using the patron barcode.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-14 20:11:46 -05:00
Joe Atzberger
e0da512939 @renew_failed can cause enormous performance-killing array.
The array was populated and values flagged with an accessor, like:
    for (@failedrenews) { $renew_failed[$_] = 1; }
But this means that an array of possibly hundreds of thousands of elements
would have to be auto-populated for high itemnumbers.  A hash is the correct
structure.  We also haven't checked the user input for validity, so we do not know
for sure that @failedrenews really does contain just itemnumbers.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-14 19:32:58 -05:00
Galen Charlton
4ef5eecf75 fix references to $session in circ/circulation.pl
Now that sticky due date processing uses the session,
script will always need it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 16:20:35 -05:00
Michael Hafen
e8e632f8db Make stickyduedate remember for session a little more permanent
Store the stickyduedate in the session.  So "Remember for Session" means
for session rather than "while on this page".

Includes some updates since initial submission of patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 16:12:34 -05:00
Galen Charlton
21625b74bf tweak removal of whitespace from barcodes
Per suggestion from Joe Atzberger, match on \s
instead of [ \t] for stripping leading and
trailing whitespace from barcode lookups.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 11:40:28 -05:00
Mason James
95909b0d81 fix to remove leading/trailing whitespace from entered barcode.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 11:30:51 -05:00
Joe Atzberger
de38cf6df1 Bug 3130 and general cleanup
Javascript error in FF and IE when loading page and no data matches criteria.
This was because it was passing more holds than necessary to the template and
letting a template conditional inside the loop control whether to display or not.
That doesn't make sense, and it forces the table to be displayed even when all
rows FAIL the conditional.  jquery.tablesorter was confused trying to be added
on top of an empty table with nothing to sort.

There were several other errors addressed by this patch:
 ~ 13 unused variables deleted.
 ~ regexps run on user-supplied $var before checking $var defined
 ~ decimal ratio prohibited and silently replaced with "3"

I also added the hold ratio to a column display, with a jquery tweak to put it in
the ratio input box on click.  Hidden .sql div now contains the actual query run,
like the other wizard reports.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-29 07:29:10 -05:00
Michael Hafen
454dd9376b New feature Number of Returned Items to Show
This adds a system preference controlled feature.  This controls how
many returned items are shown on the check-in page.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 13:23:44 -05:00
Galen Charlton
d23a8d3069 fix to previous patch - use 'lt', not '<', to compare date strings
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-20 12:14:28 -05:00
Joe Atzberger
0ad2b08c28 Visual alert (red) on overdue return.
This was requested by a Koha user at KohaCon09.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-20 12:05:01 -05:00
Paul Poulain
6dbe43b54a fix for #946
A member returns a book : it would be better to see the category of this member
in "information member" near his name.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 16:04:50 -05:00
Mason James
a0f4cfd85c fixes error below...
bookcount.pl: Illegal Date 'Item has no branch transfers record' does not match 'iso' format: yyyy-mm-dd at /home/mason/git/kap-k3-2/circ/bookcount.pl line 88

tested on 3.0.x

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 18:37:05 -05:00
ebc9a26686 Fix for Bug 3015: Check-in screen displays branch name inconsistently
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:23 -05:00
Joe Atzberger
ba0ae6cd1c Branchoverdues circ report reworking.
branchoverdues.pl
~ Removed unused variables.
~ Use elsif where applicable.
~ Added many FIXMEs.
~ Added help description.
~ Changed link to more accurate description.
~ REFACTORED branchoverdues-specific function in C4 for obvious consolidation.

This report is still of questionable value, since it's dataset has such strange
hardcoded limitations.  It is not clear that "FU" type fines and notifys=0 are
reliable or useful indicators to query on, in hardcoded form.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 15:01:41 -06: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
d5908e57c0 Adding additional information and consolidating display of information in holds queue report
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-26 14:53:15 -06:00
9db0774cfd Enabling listing of category codes when "new patron" button is displayed.
circulation.pl lacked the code to check whether category codes existed, meaning it would only display category types.

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

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

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-08 11:08:27 -06:00
Michael Hafen
0506218f8b javascript redirect when selecting a patron on circulation.pl Patron Selection Screen
This adds a little javascript to the Patron Selection form input after searching for a patron to check out to.
On click it redirects to checking out to the clicked patron.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 20:42:47 -06:00
John Beppu
c15e1206fd bug 2874 [3/3] flagsrequired => { circulate => "circulate_remaining_permissions" }
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-23 17:02:04 -06:00
John Beppu
7b683cf583 bug 2874 [2/3]: added awareness of circulate/override_renewals subpermission
A few minor whitespace cleanups were thrown in as well.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-23 17:02:00 -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
Joe Atzberger
fd45d76e6b Trivial cleanup
2 FIXME's added.
Vestigial "8-character tabs" comment removed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-05 16:05:16 -06:00
Ryan Higgins
53a0ed93db bug 2787 : Fix Global Due date
This patch also lightly refactors the conditional structure wrapping the
call to AddItem, renaming a couple variables to remove double-negatives and
abstruse logic.  If SpecifyDueDate is ON, then the input box is used to pass
GlobalDueDate, allowing modification by circ staff, resulting in a default
'sticky' due date of the global due date in that mode.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-20 07:22:18 -06:00
Nahuel Angelinetti
090a88345a Fix overdue list if you do not specify a branchcode.
Before, if you do not provide a "branchcode" you have an empty csv export.
Now, if you have an empty branchcode you have all overdues listed in csv.
(I made a typo error in code)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 16:28:28 -06:00