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: Galen Charlton <gmcharlt@gmail.com>
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>
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>
Form - Fixes alphabetization of dropdowns.
Results - Fixes format of "Date last seen" to be the system date preference. Adds highlighting to the table.
Enables warnings. Pages generated no warnings.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
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>
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>
replacing issues.itemnumber by statistics.itemnumber
since issues was not included in the query.
All statistics on circulation for item count were zeroed.
[RM note: specifically, this patch fixes the results
when you set the 'cell value' to 'count unique items']
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
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>
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>
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>
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>
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>
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>
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>
This patch add a field that permit to make a "like" and "not like" filter on barcode in the catalog report.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>