Commit Graph

2343 Commits

Author SHA1 Message Date
Michael Hafen 2e3302a8ce Add option to inventory tool to ignore copies on loan
This adds an option to the inventory tool causing it to ignore copies
currently on loan.  This is good if you want to do inventory, but don't
want to update the date-last-seen on items currently on loan.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:57 +02:00
Galen Charlton aacefca565 reduce bib fetches during search and OPAC display
Speed up bib search and OPAC bib display, especially
when the XSLT OPAC results and details display sysprefs are
ON, by passing an existing MARC::Record object to three
functions:

C4::Biblio::get_biblio_authorised_values()
C4::XSLT::XSLTParse4Display()
C4::XSLT::transformMARCXML4XSLT (internal)

These functions previously fetched the bib from the
database, incurring the cost of DB retrieval and MARCXML
parsing even though client code already had a
MARC::Record object available.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:57 +02:00
Joshua Ferraro 0314fb7486 Fixes to two issues with status display on OPAC:
1. rather than testing for notforloan == -1, test for any negative values to set the On order status
2. in cases where itemcallnumber is blank or null, don't display the itemcallnumber brackets []

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:56 +02:00
Joshua Ferraro 6260011fb8 Distinguish between items marked 'not for loan' and 'Available'
This patch works with XSL* sysprefs == ON, a future patch will address XSL sysprefs==OFF

Items with notforloan set to a negative number still designate an 'ordered' status

Some items are marked 'not for loan' by setting that value at the item level, others by assigning
that value to that item's itemtype. This patch works for both scenarios.

Specific changes this patch introduces to the OPAC:

* Adds a new OPAC results page key 'Copies available for reference:'
* Changes 'Copies available at:' to 'Copies available for loan:'
* Changes the availability limit label in opac-advsearch from:
    'Only items currently available' to 'Only items currently
	available for loan or reference
* Displays the authorised value for the specific notforloan value in the OPAC detail page in
	parentheses next to 'Not for Loan'

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:56 +02:00
Frederic Demians d69310bac5 Avoid XSLT stylesheet building for each biblio record to transform
In XSLT.pm, put XSLT stylesheet object in a session variable in order
to avoid to build it for each biblio to parse: useful on search
result page.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:56 +02:00
John Beppu f6a5524179 New C4 Modules
* C4::Category
  - patron categories as objects
  - an all() method to return all the categories as a list
* C4::ItemType
  - itemtypes as objects
  - an all() method to return all the item types as a list
* C4::ItemCirculationAlertPreference
  - wrapper around the item_circulation_alert_preference table
  - create() and delete() methods for easy manipulation of the preferences
  - I regret giving it such a long name.
  - The item_type column should've been named itemtype to make it
    more similar to pre-existing tables.  Oh well.

(C4::Category and C4::ItemType were made so that I wouldn't have to
write SQL inside my CGI scripts.
Their main purpose is to provide an easy way to get a list of
patron categories and item types.
Do not be fooled by the amount of POD.
There's actually very little code in these modules.)

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:56 +02:00
Galen Charlton 4aae4f0ca7 fix permission error introduced in a previous patch
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:55 +02:00
Galen Charlton 890e0fab49 bug 2856 followup: remove unconditional warn
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:54 +02:00
Joe Atzberger 0ef54684d1 Minor cleanup, unused variable removed.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-26 21:14:53 +02:00
Joe Atzberger 566cf51094 Remove hardcoded "Freelist" line from Auth.
Apparently a leftover debugging snippet.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-26 21:14:52 +02:00
Henri-Damien LAURENT 173c590460 Fix :Fatal Errors occurs when date is not a regular date
When the start date or the "current date" is not a regular date
the transformation and checkdate fails because there is no
Year/Month/Date
This patch makes it fail more 'silenty' for the users and raises an
error that could be coped with.
2009-03-06 11:59:33 +01:00
Nahuel Angelinetti a85644a885 Delete all calls to thesaurus_popup.pl, and no more used plugins.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 11:09:42 +01:00
Nahuel Angelinetti 3d1a6e20d7 Move checks of additem.pl to the API
This patch create a new function DelItemCheck, that add some checks before deleting an item and return 1 if it worked fine, else an error
code (the same as in additem.pl).

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 11:09:41 +01:00
Nahuel Angelinetti 4ebba44a34 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>
2009-03-06 11:09:26 +01:00
Nahuel Angelinetti d2d103195c 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>
2009-03-06 10:53:00 +01:00
Nahuel Angelinetti 5a1e844d10 Add a date field in news edition, and permit to set the "timestamp" field, that is the publication date and modify the GetNewsToDisplay to return only news that timestamp is < to current date that permit to publish news later without any action.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:52:59 +01:00
Nahuel ANGELINETTI 0060634c36 (bug #2929) permit to define "fine days" in issuing rules
This patch add a function un C4::Members that check if a user is allowed to loan a document.
Add a control in issuing.
Add a column in issuingrules table.
And add the needed control in admin to set the fine days rules.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:47:32 +01:00
Nahuel ANGELINETTI 44d6b2e9c6 (bug #2915) C4::Biblio::DelBiblio delete the serials
This patch add the serials deletion in DelBiblio function, so now when a record is deleted all attached serials will be too.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:47:32 +01:00
Nahuel ANGELINETTI 239700d079 (bug #2856) Activate the duplicate patrons detection and check birthdate only if one is set
This patch activate the check of unique member, it was checked but not shown, and the member was added even if a duplicate was
detected.
It improve the duplicate detection, to check the birthdate only if it was specified in the form.
And fix an url of "Yes" link(if the borrower added IS the duplicate detected).

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:47:32 +01:00
Daniel Sweeney 0f659c8886 Added a require C4::Heading to resolve a circular dependency. 2009-03-05 10:47:21 +01:00
Nahuel ANGELINETTI 7a50c0fb2d (bug #2995) Set a default encoding for e-mails
Just set a default encoding as utf8 if none is provided.
2009-03-04 12:48:02 +01:00
Mason James d6458e188c fixes missing 'STDERR', causing 500 error below..
malformed header from script. Bad header=## checkpw - checking LDAP: mainpage.pl,
2009-03-04 12:47:53 +01:00
Andrew Elwell 61192bddfc Minor documentation updates.
Just a few minor updates - typo fixes and rewording of the auth process.

From a5d47fed7ab81179b8e40e4251f06a380b5fdfef Mon Sep 17 00:00:00 2001
From: Andrew Elwell <andrew.elwell@gmail.com>
Date: Thu, 19 Feb 2009 12:01:55 +0100
Subject: [PATCH] Minor documentation typos
2009-03-04 12:47:39 +01:00
Michael Hafen 1d0aba55a5 Add barcode to staff search results page.
This adds a copy barcode do the item list (Location) on the staff search
results page.
2009-03-04 12:47:38 +01:00
Joe Atzberger 19708b2069 Bug 2968 - SIP ACS_STATUS message (98) misreported config.
The *_ok methods in ILS.pm were targeting the wrong depth.
This also resolves a longstanding FIXME on to_bool() warning like:
    Argument "\x{66}\x{61}..." isn't numeric in numeric ne (!=) at /ILS.pm line 94.

The example_institution_dump.sh essentially provides the proof test case for this patch.
Run it before/after on SIPconfig.xml where "MAIN" has checkout="true" and checkin="true".
2009-03-04 12:47:37 +01:00
Nahuel ANGELINETTI 8ef0f55d8c (bug #2961) add a button to add manually the next issue
This patch add a button in "Serial Collection" to add manually the next issue. And improve the function GetNextExpected
to retrieve at least something.
2009-03-04 12:47:22 +01:00
Galen Charlton 877dc53206 bug 2126: reduce round-off errors in fine balance
If a patron has a number of fine transactions, the
total could be wrong.  This is particularly noticeable
when a patron has a zero balance, as summing a group
of floating point values derived from decimal(6,2) columns
can result a scalar value that is not zero.

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

This patch also prevents an account maintenance
fee from being applied when renewing a patron if the
amount would be 0.
2009-03-04 12:46:58 +01:00
Nahuel ANGELINETTI 484f0479e0 (bug #2957) import Date_to_Days
This patch import Date_to_Days from Data::Calc, else CalcFine can crash.
2009-03-04 12:46:58 +01:00
Henri-Damien LAURENT 763d9ec6e2 Searching empty strings broken in Authorities
This fixes search on empty strings
And if an authtype is provided then it searches on this authtype only

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-04 12:42:15 +01:00
Henri-Damien LAURENT 0bdb64200f Fix encoding items
items were doubled encoded
2009-03-03 15:32:34 +01:00
Henri-Damien LAURENT 0c9015975a Multiple field search would not work any more 2009-03-03 15:32:33 +01:00
Henri-Damien LAURENT b5d5d8db91 Bug Fixing: Amazon elements would not display at OPAC
Owed to a change in systempreferences name in templates,
amazon elements would not display
This patch creates OPACAmazonContent value for templates.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-02-18 17:39:55 +01:00
Henri-Damien LAURENT de89df5096 Add errorproof to GetCOinSBiblio
When no MARC record is returned by GetMarcBiblio for one record,
it makes search result go error 500

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-02-18 11:33:35 +01:00
Nahuel ANGELINETTI cc3698f415 (bug #2904) this patch is a fix from previous
in the previous patch the field used for link "name" was 856$z, but the unimarc doesn't specify this, it say to use the 856$2 field.
This patch make koha to use the 856$2.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-02-17 16:40:08 +01:00
Galen Charlton c814bee83a bug 2952 followup
The feature in question is described in bug 2952; to
summarize the enhancement, which the earlier patch
description did not do, the list of bibs in an
import record batch now includes a column linking
each import record to the bib that was actually created
or updated when the import batch was committed.

The improvements in this patch are:

* If bib in import batch has not been committed, it
  has not been linked to a matching new or updated bib.
  In that case, do not create a link to a guaranteed
  404 (/cgi-bin/koha/catalogue/detail.pl?biblionumber=)

* When reverting an import batch, set matched_biblionumber
  to NULL for affected records - otherwise, the Bib
  column will include links to bibs that may no longer
  exist.

* Fixed a minor HTML validation error.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-17 15:51:54 +01:00
Mason James 4f64ccc712 patch for feature 2952 - v3
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-17 15:51:54 +01:00
Henri-Damien LAURENT 3355adce2f Followup previous patch bug 2955 :
Some calls to GetMarcFromKohaField would not tell which framework to
use.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-02-11 18:31:44 +01:00
Joe Atzberger c42416d423 Bug 2940 - private shelf (list) display error on 2nd and subsequent pages.
The before/after URL for the 2nd page of list elements:
http://atz.dev.kohalibrary.com/cgi-bin/koha/opac-shelves.pl?display=privateshelves?viewshelf=120&itemoff=2
http://atz.dev.kohalibrary.com/cgi-bin/koha/opac-shelves.pl?viewshelf=120&display=privateshelves&itemoff=2

The change in query string arguments is incidental, the prevention of multiple "?" is essential.
2009-02-03 12:22:47 +01:00
Henri-Damien LAURENT 568fd7b90c Adding System Preference AllowNotForLoanOverride
this system preference was created but not added to system preferences
2009-02-02 16:14:37 +01:00
Nahuel ANGELINETTI bc8eba30c1 (bug #2937) use check_date in C4::Serials::hassubscriptionexpired
This patch change the date check in hassubscriptionexpired to use Date_Calc::check_date
2009-01-30 16:59:31 +01:00
Henri-Damien LAURENT d573a28368 Revert "more readable version of the init and new sub"
This reverts commit 5a74b4fa0c.
2009-01-28 14:55:47 +01:00
Henri-Damien LAURENT 34de5d0a4b Revert "Bug Fixing : Sub Output was mistakenly removed."
This reverts commit cf355ab195.
2009-01-28 14:54:56 +01:00
Henri-Damien LAURENT cf355ab195 Bug Fixing : Sub Output was mistakenly removed. 2009-01-27 16:32:53 +01:00
Henri-Damien LAURENT cd66ffcbc3 Reverting from MARC::File::XML parser forcing 2009-01-27 12:19:49 +01:00
Joe Atzberger 351d67dd07 Basic cleanup of fixup_cardnumber
Avoid warning on syspref "checkdigit" undefined.
Functionality essentially unchanged.

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:48 +01:00
Mason James ca9ba8b803 fix to remove blank newlines from labels
Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Marc Chantreux 71ae69780d _set_defaults_for_add easier to read
Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Marc Chantreux 5a74b4fa0c more readable version of the init and new sub
Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Nahuel ANGELINETTI e5ac4b52e7 Format marc notes
this patch add a filter to notes, it transform \n in <br />

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Joe Atzberger 79cd91dfe4 Basic reformat of section in Search.pm
In for loops, replace all-inclusive conditional blocks like:
    for (@foo) {
        if (test) {
            block;
        }
    }

with conditional use of "next":
    for (@foo) {
        test or next;
        block;
    }

This reduces the number of unnecessarily nested blocks, and the
overall number of lines.

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:46 +01:00