Commit graph

32 commits

Author SHA1 Message Date
da6824d6e2 Bug 15685: Avoid "Use of uninitialized value" warning in logs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-10-11 13:08:47 -03:00
04aea91de0 Bug 15685: (QA follow-up) Address QA issues
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-10-11 13:08:47 -03:00
Mark Tompsett
d5986c9b97 Bug 19040: Refactor GetMarcBiblio parameters
Change parameters to a hashref.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks good to me.
Two calls in migration_tools/22_to_30 still in old style.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-08-25 10:23:42 -03:00
cfba05da3b Bug 15672: (follow-up) Show descriptions instead of codes on the hold ratios report
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-23 21:07:04 +00:00
6ecf823300 Bug 15672 [Revised] Show descriptions instead of codes on the hold ratios report
This patch revises the hold ratios report so that it uses template
plugins to display descriptions instead of codes for item holding
branch, item home branch, item type, and shelving location.

To test you should have multiple items on the hold ratio report (set the
ratio to a small number to increase the number of results). It should
include one or more items which have a shelving location set.

View the hold ratios report and confirm that library names, shelving
location descriptions, and item type descriptions are shown instead of
codes.

This revised patch steals from Bug 15560 to enable the correct display
of multiple home libraries, holding libraries, shelving locations, item
types, and call numbers. To properly test you should have records in
your report which have multiple values for each of those fields.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-23 21:07:04 +00:00
7e1ccbd606 Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving'
Currently, the hold ratios script only counts on order items where the
record item is created at the time the order is placed, and not if the
item is created when the item is received.

Test Plan:
1) Set AcqCreateItem to recieving
2) Run the hold ratios report with "include ordered" checked
3) From aquisitions, order some additional items for the record
4) Re-run the hold ratios report, not there is no change in the ratio
   for that record
5) Apply this patch
6) Re-run the hold ratios reporat again, the ratio should now have
   changed

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-03-21 22:55:10 +00:00
7482d80068 Bug 14920: Simplify the date management on reserveratios
Note that the previous patch was wrong, the start date defaulted to yesterday,
the original behavior is to default to last year.

This patch removes some unecessary variable declarations and tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-13 11:39:11 -03:00
Marc Véron
388f69e5c9 Bug 14920: Remove C4::Dates from circ/reserveratios.pl
This patch removes C4::Dates from circ/reserveratios.pl

To test:
- Make sure you have many holds for biblios with not so much items (e.g. 5 holds, 1 item)
  or follow hint below
- Go to Home > Circulation > Hold ratios
- Verify that everything works the same without an dwith patch

Hint: To get a big table you can set 'Hod ratio' in the filter to 0.1  (default value is 3).
This was will trigger biblios with less holds than items.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with dateformat syspref, datepiker Ok

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-13 11:39:01 -03: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
f31e39246a Bug 13299 - Add home library column to the holds ratios report
It seems odd that only the holding libraries are listed on the holds
ratios report, we should add the home libraries as well.

Test Plan:
1) Apply this patch
2) Run the hold ratios report
3) Note the new home libraries column

Signed-off-by: Heather Braum <hbraum@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2015-02-09 15:24:44 -03:00
d8e5f0cd9d Bug 13298 - Holds ratios report ignores ordered items
The holds ratio report ignores ordered items. This could cause a library
to inadvertently order more copies of a title than they actually need.
An option should be added to count ordered items ( i.e. any negative
notforloan value ).

Test Plan:
1) Apply this patch
2) Create a record with two items, one regular, one ordered.
3) Place 3 holds on the item
4) Run the reserve ratios report, by default you should see this record
5) Check the new 'include ordered' checkbox, rerun the report
6) Note that record is no longer displayed

Signed-off-by: Heather Braum <hbraum@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:24:04 -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
Galen Charlton
13fe2e013d Bug 11665: (follow-up) simplify code
This patch replaces some of the logic with more direct
Boolean expressions.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-04 19:13:44 +00:00
Jacek Ablewicz
0519c428ef Bug 11665: An ability to place orders directly from hold ratios list
This enhancement introduces a possibility to place orders
from hold ratios list:

- new option "Add order to basket" -> "From titles w/ highest hold ratios";
(user gets redirected from acqusition to "hold ratios" list in circulation)

- "N to order" in "Items needed" column now becomes a link - when clicked,
user gets redirected back to acquisition, directly to order form for
a choosen title (suggested quantity "N to order" is being preserved)

- in the "Items needed" column, there is an additional indication if
there are any pending (not yet received) orders for a given title

This solution is not exactly ideal.. most important drawback: to use
it librarian needs both acquisition & circulation priviledges; if not
having both - new options will not show / wouldn't be active. But it
requires relatively small amount of changes in the code.

To test:
- apply patch,
- test new functions (try to place some orders using an newly added
option, examine resulting order records etc.)
- check modified hold ratios list for possible problems (for user
with only circulation priviledges, additional information regarding
pending orders should be still visible, but not the link
to order form)
- ensure the two following existing options for adding orders to basket
("From an existing record", "From a new (empty) record") a still working
properly.

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

Minor edit in signoff: Changed "w/" to "with"

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works nicely in my tests, neat new addition.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-04 19:13:39 +00:00
Francesca Moore
cc34a816a1 Bug 11231: remove reference to ambiguous notes column from two hold request reports
The 'notes' column has been removed from the pending holds and hold
ratios reports as they were not displaying in the first place.

1.apply patch
2.verify that both reports work

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-18 23:21:04 +00:00
dbaefb626c Bug 10550: Fix database typo wthdrawn
This patch updates the wthdrawn field in items and deleteditems to be
withdrawn instead. No functional changes are made.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Save for translation files (that will be fixed on next release),
only occurrence of wthdrawn is on updatedatabase.pl
No koha-qa errors.

This touch many files, and I did not test everything,
but all seems normal. I think that any problem could
be fixed later.

Perhaps both entries in updatedatabase.pl could be joined
into one, but thats for QA.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:58:41 +00:00
b00ec06968 Bug 10080 - Change system pref IndependantBranches to IndependentBranches
Test Plan:
1) Enable IndependantBranches
2) Apply this patch
3) Run updatedatabase.pl
4) Verify that the system preference still functions correctly

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-22 07:58:23 -07:00
Jonathan Druart
91155470ba Bug 9984: Remove server-side sort on the hold ratios table
JS is a requirement for the staff client, so the sort link on header is
useless.

Test plan:
Check that there is no regression (sort, data, etc.) on the hold ratios
table.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested on top of patch for bug 9459.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-21 20:44:01 -04:00
Jonathan Druart
a469663d7b Bug 9108: Followup: send the dateformat value from C4::Auth
- the dateformat value is send to all templates (from
  C4::Auth::get_template_and_user)
- remove all assignment of dateformat in all .pl files
- the DHTMLcalendar_dateformat variable is unused

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts:
 - opac/sco/sco-main.pl
 - reports/acquisitions_stats.pl
 - tools/cleanborrowers.pl

All tests pass, perlcritic problems appeared in some files
before and after these patches were applied.

Checked sorting in following pages:
- acqui/addorderiso2709.tt - list of staged imports in acq
- acqui/histsearch.tt - sorting of dates in acq search result list
- acqui/invoices.tt - billing date in list of invoices in acq
- acqui/lateorders.tt - list of late orders in acq
- acqui/ordered.tt - ordered titles and estimated costs for a fund
- acqui/parcels.tt - receive shipment page
- acqui/spent.tt - received titles and actual costs for a fund
...
- serials-search.tt - subscription search result list
...
- opac/sco/sco-main.tt - due dates in list of checked out items
- reports/acquisitions-stats.tt - date searches, display of dates
- tools/cleanborrowers.tt
- tools.holidays.tt - different views of dates library is closed,
  adding dates

Checked dates display according to system preference everywhere and
searching, entering dates etc. still worked as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-17 21:59:30 -05:00
Brett Wilkins
f824121bb1 bug 6724: enable decimals on values greater than 1
Separating perl standard uses from koha uses

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-07 08:39:18 +12:00
05c240953a Additional fix for Bug 3550, Use GetRecordValue to get the subtitle
- Adding subtitle to Hold Ratio report output
- Sorting by default on ratio, descending
- Adding author
- Removing description

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-10 05:18:32 +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
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
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
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
Galen Charlton
20241fd686 more XHTML corrections for new circ reports
Note: I question the use of GROUP_CONCAT(... SEPARATOR '<br/>'),
because that puts knowledge of the output mechanism (currently HTML)
into the SQL query.  However, I am not fixing this right now.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:42:21 -05:00
Galen Charlton
f3258cc311 SQL cleanup in new circ scripts: use placeholders
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:42:20 -05:00
Galen Charlton
ef8a880b25 use C4::Debug instead of checking DEBUG env var directly
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:42:19 -05:00
Galen Charlton
a2c59f25e2 various date-related cleanups in circ
* use Date::Calc to perform date arithmetic
* use Date::Calc::Today to consistently format the current date
* format date per syspref in overdue report

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:42:14 -05:00
Galen Charlton
b558a13323 disallow division by zero in hold ratio report
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:42:13 -05:00
Darrell Ulm
8cafcef8bf All patches to Koha 3 beta to date. All work with branches.
Billing.pl     -- new, gives bills that occur in a range, works
 pendingreserves.pl  -- fixed, works now, with branches also
 reserveratios.pl  -- indicates distressed reserves
 itemslost.pl  -- Fix to this to make it more useful and fix bugs
 Itmes.pm -- small change to work for itemslost, should not affect
             anything else
 and all tmpl files.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:42:07 -05:00