Commit Graph

200 Commits

Author SHA1 Message Date
Alex Arnaud 28a9780e44 (MT 3267) Add Homebranch and Holdingbranch search criterion on circulation stat. 2010-05-14 09:48:01 +02:00
Nahuel ANGELINETTI b158de11c8 (bug #4038) fix birth date filter in borrowers stats
this patch format date for SQL if there is non-iso dates.
2010-01-19 22:08:17 +01:00
Nahuel ANGELINETTI c053ba7a15 [followup](bug #3760) delete some warn 2009-11-09 18:08:30 +01:00
Nahuel ANGELINETTI d3a1ca0931 (bug #3760) fix and improve some reports
This patch fix some problems with dates, and itemtypes level.
And it improve some sql queries.
2009-11-09 18:08:30 +01:00
Nahuel ANGELINETTI 1874d5d1ba (bug #3557) fix bor_issues_top
Just add the condition where column is "None".

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:31 +02:00
Nahuel ANGELINETTI 75b5e00152 (bug #3546) fix issues_stats
This fix the order of columns.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:30 +02:00
Nahuel ANGELINETTI f9ef9de6c1 (bug #3512) fix acquisition reports and group by
This fix, just change a grep value that make different way to calculate the table depending on the choosen column and line.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:30 +02:00
Nahuel ANGELINETTI df04be473e (bug #3412) fix double encoded guided report
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:29 +02:00
Garry Collum b8e566837a Bug 3420: Revised follow-up patch for 'patrons with no checkouts'
Comments out all warnings that were used for debugging.

Enables warnigns and fixes the resulting warnings.

This patch replaces the previous follow-up patch for bug 3420.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:28 +02:00
Garry Collum 970adb16e4 Bug 3420: Fixes 'Patrons with no checkouts' report.
Fixed typo in SQL statement.  Commented out some unused SQL statements.

Removed limit for itemtype (column not available in results) and added limit for branchcode.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:25 +02:00
Garry Collum 9bc02948c1 Bug 2553: Alphabetization of branches in the catalogue stats report.
Improvement on previous patch by using GetBranchesLoop.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:21 +02:00
Garry Collum 8fb80eb369 Bug 2553: Alphabetization of branches in Checkout Statistics form.
Improvement of previous patch through the use of GetBranchLoop.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:21 +02:00
Garry Collum 60673d3ec9 Bug 2553: Fixes the alphabetization of the drop-down lists for the Most-Circulated items report.
This patch alphabetizes the descriptions that appear in the  Library, Item type, and patron category drop-down lists of the Most-Circulated Items report form.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:20 +02:00
Garry Collum f4ddbfc3c1 Bug 2553: Fixes the location drop-down alphabetization for the catalog statistics report form.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:20 +02:00
Garry Collum 7edc676086 Bug 2553: Fixes drop-down alphabetization for Circulation Statistics report form.
Fixes alphabetization for the item type, library and collection drop-down lists in the Checkout Statistics wizard form.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:20 +02:00
Garry Collum bb040af3a3 Bug 2553: Fixes location drop-down alphabetization in Serials Statistics wizard form.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:20 +02:00
Garry Collum 5d2dcdd556 Bug 3392: Fixes highlighting in Patrons with no Checkouts report.
Fixed class definition and moved the definition from the <td> tags to the <tr> tags.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:17 +02:00
Garry Collum 915a339832 Bug 3022: Cataloging statistic wizard not pulling the itemtype data correctly.
Added code to detect if the syspref for item-level_itypes is being used.  The report now correctly returns data based on the syspref.  There are some pre-existing XML errors with the FORM view of catalogue_stats.pl.  I'll send a subsequent patch to deal with these.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:18:59 +02:00
Chris Cormack a4d21f0626 Bug 1542, fixing filter by area in reports dictionary
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:18:49 +02:00
Galen Charlton 973b9a288a bug 2540: allow download of report
$error return C4::Reports::execute_query is
always defined.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2009-09-04 10:28:19 +12:00
Nahuel ANGELINETTI eb6668200c (bug #3196) fix itemlost.pl
This patch fix 3 things:
* fix order by
* take care of item_level-itype
* use join in sql query

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:29 +02:00
Nahuel ANGELINETTI 6027023cfe (bug #2939) delete a warning
just add a default value to $sep
2009-05-26 21:15:23 +02:00
Nahuel ANGELINETTI f9b78cec1a (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.
2009-05-26 21:15:23 +02:00
Nahuel ANGELINETTI d189c46df5 (bug #3174) fill borrower number, and show author and creation date in saved reports
This patch add 2 columns in "Use Saved" page whith creation date, and the creator id.
It fix the creation of a report, to save the borrowernumber in reports table(to show it after).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:22 +02:00
Chris Cormack 5b8bed524e Update for bug 1545 allowing for the title to be edited
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:13 +02:00
Chris Cormack a1a8883263 Allowing users to edit saved sql in guided reports. Bug 1545
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:12 +02:00
Galen Charlton 8aba8be97f restored tab-delimited report download
Previous patch broke this, always providing the
guided report download in CSV format regardless of
whether CSV or tab-delimited was requested.

Also, default name of downloaded file is reportresults.csv
for CSV output and reportresults.tab for tab-delimited.

Also removed a couple subroutine prototypes that
were leading to unnecessary compile-time warnings
under use warnings.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:07 +02:00
Joe Atzberger 2419838963 Bug 3066 - Overhaul guided reports
execute_query now refactored, returns reliable results, does
zero presentation-layer crap.  Arguments reduced, client scripts
adapted to new API and performance improved.  Text::CSV now used
to generate CSV output, ensuring portability, encoding and accuracy.

Replaced tools/runreport.pl with misc/cronjobs/runreport.pl:
    ~ security fixed
    ~ documentation improved
    ~ TODO: finish sendmail option.

Bug 3077 also fixed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:07 +02:00
Joe Atzberger 4c232716b2 Condense inarticulate construction of TMPL structures.
Use map to replace multiple temporary hash constructions.
Also a minor POD fix.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:07 +02:00
Joe Atzberger 905d7404fe Sort collection codes by description for dropdown.
Collection code descriptions were otherwise displaying in an
unsorted order.  The result was not readable for any sufficiently
large number of ccodes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:02 +02:00
Joe Atzberger 0c57eb2d11 Fixing catalogue_out errors.
This script ran against biblioitems.itemtype instead of items.itype.
With that corrected, biblioitems is not used by the query.

Report also failed to check whether the item was currently checked out
(i.e., in the issues table) before declaring it an inactive,
uncirculating item!

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:01 +02:00
Joe Atzberger 17b3535be4 catalogue_out report cleanup.
Warnings enabled, comparison adjusted to accomodate undef.
Hardcoded CGI::scrolling_list removed.
Sort order on item types corrected.  Unused dependencies commented out.
GetBranchesLoop used instead of copy/paste code.

NOTE: CSV output is not fixed by this 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:59 +02:00
Henri-Damien LAURENT 74cc235347 Revert "Fix the guided report export, bad check of errors(bug #2672)"
This reverts commit ae4b02cdc4.
2009-03-06 17:05:25 +01:00
Nahuel Angelinetti ae4b02cdc4 Fix the guided report export, bad check of errors(bug #2672)
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:47:31 +01:00
Galen Charlton b46c65857e bug 2540: allow download of report
$error return C4::Reports::execute_query is
always defined.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:47:31 +01:00
Nahuel Angelinetti 21fc2c6e24 Fix the CSV export, provide it in UTF-8
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:47:30 +01:00
Nahuel Angelinetti e279c0afe8 a more readable way to test an array size.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:44 +01:00
Nahuel Angelinetti b85581b5d4 (bug #2854) add the possibility to make a fuzzy search on the barcode
This patch add a field that permit to make a "like" and "not like" filter on barcode in the catalog report.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:29:31 +01:00
Allen Reinmeyer a08a9f196e 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-12 17:03:19 +01:00
Galen Charlton d35bed6b40 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-11-12 15:11:32 +01:00
Jesse Weaver b69e271424 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-11-12 15:11:26 +01:00
Joe Atzberger c57d2de516 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-11-12 15:11:22 +01:00
Nahuel Angelinetti 846121e4ce Fix the CSV export, provide it in UTF-8
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:49:43 +01:00
Galen Charlton d23632a77d 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-11-12 14:49:26 +01:00
Nahuel Angelinetti 96df48e786 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-11-12 14:48:48 +01:00
Joe Atzberger e934749b20 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-11-12 11:33:53 +01:00
Joe Atzberger 3a2ddbe050 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-11-04 18:46:10 +01:00
Galen Charlton 0e92cff8ab 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-10-28 22:09:24 +01:00
Vincent Danjean 26acd6de8c Still fixing permission and first line of scripts
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-28 22:09:24 +01: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