Commit graph

63 commits

Author SHA1 Message Date
c43a555dbc Bug 19059: Fix compilation issues
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-09-12 12:42:59 -03:00
82115d164a Bug 19059: Move C4::Reserves::CancelReserve to Koha::Hold->cancel
This patch adds a new Koha::Hold->cancel method and replaces the calls
to C4::Reserves::CancelReserve with it.

Test plan:
- Add and cancel holds
- Change priority of holds

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-09-12 12:42:58 -03:00
2b90ea2cb0 Bug 17829: Move GetMember to Koha::Patron
GetMember returned a patron given a borrowernumber, cardnumber or
userid.
All of these 3 attributes are defined as a unique key at the DB level
and so we can use Koha::Patrons->find to replace this subroutine.
Additionaly GetMember set category_type and description.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-07-10 13:14:19 -03:00
6eade474ed Bug 18276: Remove GetBiblioFromItemNumber - Easy ones
The subroutine C4::Biblio::GetBiblioFromItemNumber was wrong for several
reasons:
- badly named, we can get biblio info from a barcode
- SELECT * from items, biblio and biblioitems
makes things hard to follow and debug, we never know where do come from
the value we display
- sometimes called only for trivial information such as biblionumber,
author or title

This patchset suggests to replace it with calls to:
- Koha::Items->find for item's info
- $item->biblio for biblio's info
- $item->biblio->biblioitem for biblioitem's info

Test plan:
Item's info should correctly be displayed on the following pages:
- circulation history
- transfer book
- checkin
- waiting holds

QA will check the other changes reading the code, it's trivial

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-07-10 12:22:29 -03:00
7963796978 Bug 16530: Add a new method to the Branches TT Plugin to avoid c/p
We should do the same for the other check (FA exists), but cannot find a
good and quick way to implement.

Doing it this way will avoid regression later, we will no have to check
if the variable is correctly passed to the template.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-03 18:34:36 +00:00
Aleisha
1edb8cbeee Bug 16530: Adding a circ sidebar navigation menu and circSidebar syspref to activate/deactivate
Edit: Fast cataloging link should now show on all pages, removed offline circulation links
Edit 2: Creates the syspref to activate or deactivate the sidebar
Edit 3: Fixing merge conflicts, using Koha::BiblioFrameworks to find FA
framework and adding sidebar to on-site checkouts

This adds a sidebar to
circ/branchoverdues.tt
circ/circulation.tt (I also fixed up some of the indentation in this file to make it easier to see where the divs started and ended)
circ/renew.tt
circ/returns.tt
circ/selectbranchprinter.tt
circ/transferstoreceive.tt
circ/view_holdsqueue.tt
circ/waitingreserves.tt
circ/branchtransfers.tt
circ/on-site_checkouts.tt

To test:
1) Confirm syspref CircSidebar is activated
2) Go to all of the above pages and confirm the sidebar menu shows up
3) Confirm fast cataloguing link and transfer link are there
4) Trigger any error messages you can possibly think of (i.e. on renew.pl: barcode does not exist). Confirm that this does not mess up the layout of the page
5) Go to a user account page, Check out tab. (Since this is a circ/circulation.pl page). Ensure the circ nav sidebar doesn't show up (confirm it looks as it usually does)
6) Deactivate circSidebar
7) Confirm pages all look normal

Sponsored-by: Catalyst IT

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-03 18:34:36 +00:00
bb1e9c500c Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib
The subroutine C4::Koha::GetKohaAuthorisedValueLib just retrieves a description
(lib) for a given authorised value.

We can easily replace it using:
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->lib
or
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->opac_description

Test plan:
- On the detail page of a bibliographic record, the description for notforloan,
restricted and stack (?) should be correctly displayed
- View a shelf, the location (LOC) description should be displayed
- On the search result page, the location description should be displayed in the
  facets
- Set AcqCreateItem=ordering and receiving items.
The description for notforloan, restricted, location, ccode, etc. field
should be displayed.
- When creating item in the acquisition module, the dropdown list for
  field linked to AV should display the AV' descriptions
- On the transfers page, the description of the location should be
  displayed.
- On the checkout list from the circulation.pl and returns.pl pages, the
  description for "materials" should be displayed
- Fill some OPAC_SUG AV and create a suggestion, the reason dropdown
  list should display the description of OPAC_SUG

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 13:11:55 +00:00
62f4186f88 Bug 15758: Fix variable name, it's a branchcode
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:06 +00:00
df97814f30 Bug 15758: Koha::Libraries - Remove GetBranches
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:03 +00:00
9b9803b69c Bug 15758: Koha::Libraries - Remove GetBranchesLoop
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:02 +00:00
Chloe
47caf69a46 Bug 12045 - Transfer impossible if barcode includes spaces
have changed the code which strips the white space to only remove the leading and trailing white space instead

To Test-
1- go to circulation -> transfer
2- attempt to tranfer an item where the barcode has a space in the middle of it
3- it should fail
4- apply patch
5- try again
6- it should work

NOTE: I purposefully added: die "($barcode)";
      Before, all spaces were removed.
          '    white space    ' became '(whitespace)'
      After, only external spaces were remove
          '    white space    ' became '(white space)'

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 01:08:01 +00:00
ff1579de6d Bug 15258: Fix Perl scripts declaring unused variables
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

All affected files tested with `perl -c`.
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2015-12-30 17:24:45 -07:00
Marc Véron
466eebe9e5 Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence
The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two
ambiguous words 'to' and a sentence splitted up by html tags, leading to weird
translations. Example in German: "Sie können keine Exemplare aus itemtype
transferieren BK für: Airfield"

To test:
- Apply patch

- Set up transfer policies for item types and collection codes in
  Home > Administration > Set library checkin and transfer policy
  Make sure that you have rules that deny and others that allow transfers

- Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce'

- Set 'BranchTransferLimitTypes' to 'item type'

- Go to Home > Circulation > Transfers
- Transfer an item that is allowed for item type
  - Verify that the table of transferred items displays information
    about Item type, Collection code and Destination

- Transfer an item that is not allowed for the item type
  - Verify that the information about not allowing the transfer displays
    properly and is meaningfull

- Set 'BranchTransferLimitTypes' to 'collection code'

- Repeat the transfer steps above for allowed / not allowed collection code

(Amended to add ids to table and 8 columns, see comment #2)
(Amended for comment #5)
Followup for comment #8

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2015-12-29 21:24:50 +00:00
Jonathan Druart
a6c9bd0eb5 Bug 9978: Replace license header with the correct license (GPLv3+)
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

http://bugs.koha-community.org/show_bug.cgi?id=9987

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-20 09:59:38 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
afd2418d73 Bug 11349: Change .tmpl -> .tt in scripts using templates
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.

This patch changes the occurences of '.tmpl' in favour of '.tt'.

To test:
- Apply the patch
- Install koha, and verify that every page can be accesed

Regards
To+

P.S. a followup will remove the glue code.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-17 11:05:49 -03:00
53fbfa2dde Bug 9394: Use reserve_id where possible
This patch switches from using a combination of
biblionumber/borrowernumber to using reserve_id where possible.

Test Plan:
1) Apply patch
2) Run t/db_dependent/Holds.t

Signed-off-by: Maxime Pelletier <maxime.pelletier@libeo.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 05:04:55 +00:00
fff32393cf Fix for Bug 7123 - barcode should be one word
Other fixes thrown in for good measure:

- Adding data to the results table to match output of returns
- Better checking of error codes in the script to control
  output of error messages (don't show error box when there
  are no errors).
- Move some errors/messages from the right column onto the
  top of the page to match Koha's established pattern.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-13 17:48:02 +01:00
Paul Poulain
ddbedbfc2f Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
Lars Wirzenius
a9c4c50f07 Fix FSF address in directory circ/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:50 -04:00
Henri-Damien LAURENT
4271bbb738 Modifying Members : Add Mod and GetMember
This update the way Member is added and editing so that import and Edition
 could be best automatized
GetMember evolves and allow ppl to serach on a hash of data

Adding SQLHelper A new package to deal with INSERT UPDATE and SELECT

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:29:23 +02: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
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
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
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
Chris Cormack
f0bf2fea25 Fix for bug 1400, some variables not being passed to the branch transfers
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-09 14:49:59 -06:00
Galen Charlton
9d4d8897b2 item rework: various changes
* Move CheckItemPreSave to C4::Items (from C4::Biblio)
* Modified C4::Biblio::AddBiblioAndItems to use appropriate
   internal routines from C4::Items
* Moved GetItemnumberFromBarcode to C4::Items
* Removed duplicate C4::Biblio::_koha_new_items
* Removed disused C4::Biblio::MARCitemchange

Currently AddBiblioAndItems is a special routine that
uses private subs from both C4::Biblio and C4::Items.
This needs to be refactored.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:42 -06:00
Chris Cormack
052861306b Fix to redirect the user ot the select branch page if they try to use
circulation without a branch set

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 20:03:08 -06:00
Chris Cormack
ddd0140ef1 Fix for bug 1626, whitespace stripped from barcodes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 16:24:30 -06:00
b6e604c80e patch
See attached file. Thanks.

>From 1c3021f31675193ad2e9b91a95191f9ae0caeff2 Mon Sep 17 00:00:00 2001
From: Frederic Demians <f.demians@tamil.fr>
Date: Wed, 24 Oct 2007 11:50:08 +0200
Subject: [PATCH] Borrower name autocompletion improvement
 Autocompletion is selected by syspref directly in circ-search.inc.
 This way it could be activated elsewhere just by adding CircAutocompl
 param into page using circ-search.inc.
 Done for example in circ/branchtransfers.pl. Must be done in all other
 circ/*.pl pages.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-24 17:01:41 -05:00
tipaul
fb143b71ba BIG COMMIT : cleaning of Reserves.pm. See detail on koha-devel 2007-04-24 16:10:36 +00:00
hdl
100e6a9808 functions that were in C4::Interface::CGI::Output are now in C4::Output.
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
2007-04-24 13:54:28 +00:00
tipaul
3ddec89262 moving Reserves2.pm to Reserves.pm 2007-04-23 14:08:47 +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
c596d55374 HUGE COMMIT : code cleaning circulation.
some stuff to do, i'll write a mail on koha-devel NOW !
2007-04-04 16:46:22 +00:00
tipaul
2ffd5b7228 rel_3_0 moved to HEAD 2007-03-09 14:28:54 +00:00
tgarip1957
4843e0ee78 Resynching Savannah 2006-11-15 01:41:51 +00:00
tgarip1957
7e52a5665c Clean up before final commits 2006-09-06 16:21:03 +00:00
toins
3c6410111b subs renamed according to coding guidelines. 2006-07-21 10:10:29 +00:00
toins
cc9524a875 Head & rel_2_2 merged 2006-07-04 14:36:51 +00:00
bob_lyon
92d88b35a7 merging katipo changes...
frbranchcd was being passed tobranch info from transferbook
2006-06-07 03:29:19 +00:00
tipaul
b38997925f big commit, still breaking things...
* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued
2005-10-26 09:11:02 +00:00
tipaul
9b2028ab72 some fixes, and links to themelang/images 2003-03-11 15:13:18 +00:00
acli
bf5fb01d32 Make sure flagsrequired is *circulate* not parameters 2003-02-06 05:10:54 +00:00
acli
993c57941b Fixed bug 202, the branch menu-building code has spurious checks for CU and
IS fields, which does not exist, resulting in no branches being added

For selectbranchprinter:
Noted correct tab size
Handle non-latin1 charsets

For branchtransfers:
Use getbranch and getprinter
Removed spurious checkauth call and associated unused variables
2003-02-05 09:07:09 +00:00
acli
4d7c1a0ca3 Missing "use" statement
Noted correct tab size
2003-02-05 08:04:00 +00:00
acli
52a5fd4bbd Moved C4/Charset.pm to C4/Interface/CGI/Output.pm
Create output_html_with_http_headers function to contain the "print $query
->header(-type => guesstype...),..." call. This is in preparation for
non-HTML output (e.g., text/xml) and charset conversion before output in
the future.

Created C4/Interface/CGI/Template.pm to hold convenience functions specific
to the CGI interface using HTML::Template

Modified moremembers.pl to make the "sex" field localizable for languages
where M and F doesn't make sense
2003-02-02 07:18:37 +00:00
hdl
6bff70151f Templating branchtransfers.pl 2003-01-28 00:48:36 +00:00
tonnesen
7aeb26593b Merging changes from rel-1-2 into trunk (circulation module only) 2002-10-24 18:30:17 +00:00