Commit graph

165 commits

Author SHA1 Message Date
Nahuel ANGELINETTI
6c5bf09326 (bug #2939) delete a warning
just add a default value to $sep

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 17:09:06 -06:00
Nahuel ANGELINETTI
720cddeca6 (bug #2938) add a serials subscriptions report
this patch add a report for serials.
It's have to limit branch/bookseller, and excluding expired serials.
It's possible to export in CSV format.
This patch will have another, to add this report in menus.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-02 08:41:48 -06:00
Nahuel Angelinetti
e5adbdcbd1 a more readable way to test an array size.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 19:59:12 -06:00
Allen Reinmeyer
338e0a0dd5 Bug #2760 wrong permissions for guided reports
Guided reports and dictionary access was dependant on the editcatalogue permission instead of the report permission.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 15:37:38 -06:00
Galen Charlton
da1085ccfa bug 2543: follow-up patch
Add 'use C4::Reports' lines that original patch
omitted.

Note that original patch prevented these two reports
from even compiling.  Not good.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 12:06:47 -05:00
Jesse Weaver
b8d8a0ec5a fix for bug 2543: report output by tabulation a bit too literal
This repurposes the Reports module for general reports, and moves its functionality to a different module, Reports::Guided. It also updates all of the reports that can export to correctly treat the 'tabulation' value of the 'delimiter' syspref.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 11:44:28 -05:00
Joe Atzberger
feed19f154 Patch security hole in vestigial report.
IMHO, this report should be removed in entirity because of its faulty
construction and total inability to distinguish between register "tills".
That is, it appears to be a valid accounting measure but isn't.
In any case, it let's not let just anybody run it!

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-23 11:15:28 -05:00
Nahuel Angelinetti
f6027eb426 Fix the CSV export, provide it in UTF-8
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 10:58:02 -05:00
Galen Charlton
851a693be4 bugfix: fixed reference to sort2 column in query
Fixes following error when using the patron statistics report:

DBD::mysql::st execute failed: Unknown column 'sort' in 'where clause' at /home/gmc/koha/dev/reports/borrowers_stats.pl line 127

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 10:39:29 -05:00
Nahuel Angelinetti
f620ced0b5 Add the feature to create reports with borrower's sex information(Men/Women) (bug #2671)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 10:15:06 -05:00
Joe Atzberger
ee48f60a93 DHTMLcalendar should not be imported.
Changing these scripts as precursor to removing it from C4::Dates @EXPORT_OK

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-16 22:21:57 -05:00
Galen Charlton
c9d7c42a60 bug 2540: allow download of report
$error return C4::Reports::execute_query is
always defined.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 18:50:16 -05:00
Joe Atzberger
225e115a85 issues_stats returns empty results if row/column = items.ccode/datetime
Also added ESCAPE="HTML" to column/row headers because users may define
collections that include ampersands, like:
    B&T Rental--Fiction
The Tidy error associated would be:
    line 574 column 29 - Error: general entity "T" not defined and no default entity

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-21 16:50:43 -05:00
Vincent Danjean
c52357edc6 Still fixing permission and first line of scripts
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 20:23:54 -05:00
Chris Nighswonger
860f1f70e5 kohabug 2458 Disallowing non-SELECT SQL in reports module
This patch enforces SELECT-only SQL in the reports module.
It introduces code to check SQL in two places. The first is
when a save is attempted on a user constructed SQL statement.
If a non-SELECT SQL statement is entered, the user will be
presented with an error message and a button giving the
option of editing the SQL. The second is when any SQL is
executed. If execution of a non-SELECT SQL statement is
attempted, the user is presented with an error message and
instructed to delete that report as the SQL is invalid.

The second check is intended as a safety net as no non-SELECT
SQL should ever be saved.

It may be well to document the proper usage of the direct SQL
entry type report.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-08 10:52:34 -05:00
Chris Nighswonger
953a46a088 kohabug 2417 Removing hardcoded query limit from reports
This patch removes a hardcoded 'LIMIT 20' which was added to all report queries
thus limiting all reports to only the first twenty rows of applicable data. In
its place this patch introduces code to paginate through all applicable data,
regardless of how many rows are available. The code will also honor any user
defined 'LIMIT' in reports based on SQL entered directly by the user.

This patch also adds column labels to 'tab' and 'csv' files generated by reports.
NOTE: Only user defined 'LIMIT's apply to 'tab,' 'csv,' and 'text' files.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-04 15:26:50 -05:00
Chris Nighswonger
35b3df2e95 kohabug 1679 & 1680 Fixes date formatting in guided reports wizard
This patch corrects date formatting when defining dictionary definitions in the
guided reports wizard so that dates display according to syspref.

Date formating is also corrected in the report creation section of the guided
reports wizard.

It also corrects a javascript bug which caused some of the calander widgets not
to function properly.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-04 15:26:49 -05:00
Jesse Weaver
ac0d340bd5 kohabug 2345: bad comparisons pervade reports
This patch changes all $foo eq undef's to !defined($foo). It also makes misc/spellcheck_suggest/build_spellcheck_suggest.pl have proper syntax.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:11:08 -05:00
Chris Nighswonger
f6a3f83ca2 kohabug 2224 Third installment: Further corrections for NULL fields
This patch adds code to clean out any NULL fields in rows returned
since NULL fields do not truly meet the filter criteria

It also corrects a bad db field reference.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:10:21 -05:00
Joshua Ferraro
ed646f2105 Fix 'Catalog by Itemtype' report to work with item-level itypes 2008-07-25 08:49:45 -05:00
Chris Nighswonger
d8ea5fc339 kohabug 2224 Second installment: Correcting NULL field display
Query references to the unused aqorderdelivery table caused a NULL field to be
displayed in the report results. This patch removes those references.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-24 14:54:11 -05:00
Chris Nighswonger
880c1335f6 kohabug 2224 Corrects display descrepancies when applying filters
This patch corrects display descrepancies when filters are applied to the
acquisitions report. It also corrects a number of other issues with this
report.

Some documentation changes may be in order based on report filters that
were only partially implimented, but are now available.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-24 11:26:37 -05:00
Joe Atzberger
64ba3ffe83 Refine "Patrons statistics" report, fix highlight, remove CGI::scrolling_lists.
At client request, I added code for a rowtitle_display and coltitle_display.  This
allows the script to substitute human-readable lables into the table instead of just
the literal hashkeys.  For this client with dozens of numerical patron categorycodes
having a row titled "29" was not very useful.

I cleaned up the templates and a lot of the report code.  It is of the same style as
the other copy/paste reports and still need further cleanup.  Added sql and debug
feedback (default styled to hidden), as I have for other reports.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-22 15:44:58 -05:00
Joe Atzberger
e5df39dee8 Report cleanup - fix highlight, add debugging feedback
The debugging feedback (default style: hidden) is necessary to
investigate client reports where even after "backfill_statistics"
this report still fails to return results.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-12 08:59:38 -05:00
Joe Atzberger
6bb77ae3e4 Total overhaul of broken "Items with no checkouts" report.
Previous implementation was a crude copy/paste from a larger report.
CSV output was and is not functional (disabled in interface accordingly).
Output now includes and is sorted by itemcallnumber, because the purpose
of this report is to isolate uncirculating items to cull from the shelves.
Output also includes a summary at the top, with links to individual tables
below when broken out by a grouping.  Also included in the feedback but
default styled to display="none" are the actual SQL queries.  This is
incredibly useful for debugging and should probably be done in all reports.

Yet TODO: allow date range for checkouts and instead of
"no checkouts" (=0) allow the query to filter based on =x, >x, <x, etc.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:11:32 -05:00
Ryan Higgins
48be98eaf3 Fix date filter on issues_stats.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:47:36 -05:00
Ryan Higgins
d4dd393e20 Update issues_stats to use authorised_values instead of distinct(sortn); add col/row headers as Descriptions instead of codes.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:47:34 -05:00
Ryan Higgins
0e31981100 Update issues_stats to show auth_vals as row & column headers
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:47:33 -05:00
Ryan Higgins
98bc024609 Add Collection code limit to issues_stats report.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:47:30 -05:00
Ryan Higgins
fc99bfcbb1 Update issues_stats: add shelving location limit, replace cgi::scrolling_list, update terminology.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:47:29 -05:00
Ryan Higgins
a5eb233c0c Remove commented deprecated code and a useless query on items.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-02 00:50:32 -05:00
Ryan Higgins
dc7a542deb Update Catalog Stats report: / Remove lccn/loc filter, which seems to conflate marc21 010 and 050. / Update labels to reflect 3.0 terminology.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-27 07:33:32 -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
Andrew Moore
31ad99e2b5 Bug 2094: fixing two bugs in lost items report
* I guess the limit by item type was never working. I made it look for the right database column
* I fixed the error that was returned with no items were returned.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 06:48:51 -05:00
Andrew Moore
20fd87d59b Bug 2094: cleanup of lost items report
Just some code cleanup of C4::Items::GetLostItems and reports/itemslist.pl.
Some whitespace changes, perltidy, and documentation improvements.
Also, I rewrote and SQL statement to try to reduce possibilities of SQL injection attacks.

No documentation or functional changes necessary with this patch.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 06:48:49 -05:00
Andrew Moore
c006950355 Bug 2094: implementing ability to select particular lost status in the lost items report
This patch adds a drop-down to the lost items report to let the user select a
particular lost status to display. Only items with that particluar lost status
will be dispolayed.

The documentation for the lost items report on the staff client will need to be slightly adjusted.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 06:48:45 -05:00
Joe Atzberger
78fa56a086 stats.screen.pl - cleanup, conditionalize warns w/ Debug
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 18:02:50 -05:00
Joe Atzberger
b1fbee40d5 Total overhaul of bor_issues_top report, removal from CGI::scolling_list.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-12 15:05:10 -05:00
Joe Atzberger
bde1ac3e13 Add authorised values descriptions to selector for "location".
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 16:56:37 -05:00
Joe Atzberger
60262720f0 Item-level_itypes fix, addition of ccode vector and filter.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 16:56:27 -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
Galen Charlton
3eb7a607e5 more old_issues SQL cleanup
* no need to test for 'returndate is null' in queries
  on old_issues
* added more stylistic corrections

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:54 -05:00
Henri-Damien LAURENT
2026434ed7 More problems with old_issues.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:46 -05:00
Henri-Damien LAURENT
82349a67cf Using old_issues table
need some testing on data since I donot have valid data in my fresh created database.

Note : Shouldnot updatedatabase also cope with data "moving"
when a table is created and that some data should go from one table to another ?

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:42 -05:00
Henri-Damien LAURENT
1bd019a86c borr_issues_top : adapting to old_issues changes
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:36 -05:00
Henri-Damien LAURENT
ad767716dc Bug Fix : 1898 Replaces the previous commit : More fixes.
A) Fixing queries which were mysql old style
B) Fixing output.

+ Fixing queries the same way for bor_issues_top catalogue_out and issues_avg_stats

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-19 11:08:33 -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
Paul POULAIN
8b3fd04e35 partial fix for catalogue_out
(+ removed tab in indenting)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-29 11:59:35 -06:00
Galen Charlton
ad5161d2dc XHTML corrections: guided reports
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-15 08:24:51 -06:00
Henri-Damien LAURENT
e45912470f BugFixing : 1299 /displaying lists for document types and borrower categories
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-17 21:00:59 -06:00