-
The following error was encountered:
- [% FOREACH error IN errors %]
- [% IF ( error.duplicate_running_report ) %]
-
This report is already running. Please wait for it to finish before running it again.
- [% ELSIF ( error.total_running_reports_limit_exceeded ) %]
-
You have too many reports running at the moment. Please wait for some of them to finish before running this report again.
- [% ELSIF ( error.sqlerr ) %]
-
This report contains an SQL keyword: [% error.sqlerr | html %] .
-
Use of this keyword is not allowed in Koha reports due to security and data integrity risks. Only SELECT queries are allowed.
-
Please delete this report or retry creating a new one.
- [% ELSIF ( error.queryerr ) %]
-
SQL error:
-
[% error.queryerr | html %]
-
Please check the log for further details.
- [% ELSIF ( error.cache_expiry ) %]
-
Please select a cache expiry less than 30 days.
- [% ELSIF ( error.passworderr ) %]
-
The column selection in this report includes a password field.
-
The report cannot be executed due to security risks. Please edit this report and ensure no password columns have been selected.
- [% ELSE %]
+
+
+ [% INCLUDE 'csrf-token.inc' %]
+
+ [% FOREACH result IN results %]
+ [% FOREACH cells IN result.cells %]
+ [% place = loop.index %]
+ [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
+ [% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
+ [% SET batch_itemnumbers = 1 %]
+ [% SET header_row.$place.has_itemnumbers = 1 %]
+
[% END %]
-
-
Return to previous page
+ [% END %]
+ [% END %]
+
+
+
+ [% INCLUDE 'csrf-token.inc' %]
+
+
+ [% FOREACH result IN results %]
+ [% FOREACH cells IN result.cells %]
+ [% place = loop.index %]
+ [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
+ [% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
+ [% SET batch_itemnumbers = 1 %]
+ [% SET header_row.$place.has_itemnumbers = 1 %]
+
+ [% END %]
+ [% END %]
+ [% END %]
+
+
+
+ [% FOREACH result IN results %]
+ [% FOREACH cells IN result.cells %]
+ [% place = loop.index %]
+ [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
+ [% IF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %]
+ [% SET batch_biblionumbers = 1 %]
+ [% SET header_row.$place.has_biblionumbers = 1 %]
+
+ [% END %]
+ [% END %]
+ [% END %]
+
+
+
+ [% INCLUDE 'csrf-token.inc' %]
+
+ [%# Preserve the whitespace of the following textarea in order to format the values correctly %]
+ [%- borrowernumbers = PROCESS batch_list results=results batch_type='borrowernumber' | trim | html -%]
+ [%- IF borrowernumbers -%]
+ [%- SET batch_borrowernumbers = 1 -%]
+
+ [%- borrowernumbers | html -%]
+
+ [%- END -%]
+ [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %]
+ [% IF !batch_borrowernumbers && cardnumbers %]
+ [% SET batch_cardnumbers = 1 %]
+
+ [%- cardnumbers | html -%]
+
+ [% END %]
+
+
+
+ [% INCLUDE 'csrf-token.inc' %]
+
+
+ [%# Preserve the whitespace of the following textarea in order to format the values correctly %]
+
+ [%- borrowernumbers = PROCESS batch_list results=results batch_type='borrowernumber' | trim | html %][% IF borrowernumbers %][% SET batch_borrowernumbers = 1 %][% borrowernumbers | html %][% END -%]
+
+
+
+
+ [% INCLUDE 'csrf-token.inc' %]
+
+
+ [%# Preserve the whitespace of the following textarea in order to format the values correctly %]
+ [%- reserve_ids = PROCESS batch_list results=results batch_type='reserve_id' | trim | html %][% IF reserve_ids %][% SET batch_reserve_ids = 1 %][% reserve_ids | html %][% END -%]
+
+
+
+ [% BLOCK batch_list %]
+ [%- FOREACH result IN results %]
+ [%- FOREACH cells IN result.cells %]
+ [%- place = loop.index %]
+ [%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type -%]
+ [%- cells.cell | html -%][% "\n" | $raw %][%# We want 1 item per line, without whitespace %]
+ [%- END -%]
+ [%- END %]
+ [%- END -%]
+ [% END %]
+
+
+
+
+ [% FOREACH p IN sql_params %]
+
+ [% END %]
+ [% FOREACH n IN param_names %]
+
+ [% END %]
+
+
+
+
+ [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers || batch_reserve_ids ) || ( unlimited_total > 10 && limit <= 1000 ) %]
+
-
-
-
-
-
- [% END # /IF ( errors ) %]
+
+ [% END # /IF batch operations || ( unlimited_total > 10 && limit <= 1000 ) %]
+
+
+ [% END # UNLESS ( errors ) %]
+ [% END # IF ( execute ) %]
+
+ [% UNLESS ( errors ) %]
+
+
+
+ [% FOREACH header_ro IN header_row %]
+ [% IF header_ro.has_itemnumbers && ( header_ro.cell == 'itemnumber' || header_types.item( header_ro.cell ) == 'itemnumber' ) %]
+ [% header_ro.cell | html %]
+ [% ELSIF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %]
+ [% header_ro.cell | html %]
+ [% ELSIF header_ro.cell == 'cardnumber' || header_types.item( header_ro.cell ) == 'cardnumber' %]
+ [% header_ro.cell | html %]
+ [% ELSIF header_ro.cell == 'borrowernumber' || header_types.item( header_ro.cell ) == 'borrowernumber' %]
+ [% header_ro.cell | html %]
+ [% ELSE %]
+ [% header_ro.cell | html %]
+ [% END %]
+ [% END %]
+
+
+
+ [% FOREACH result IN results %]
+
+ [% FOREACH cells IN result.cells %]
+ [% place = loop.index %]
+ [%- IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
+
+ [% cells.cell | $raw %]
+
+
+ [% ELSIF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %]
+
+ [% cells.cell | $raw %]
+
+
+ [% ELSIF header_row.$place.cell == 'borrowernumber' || header_types.item(header_row.$place.cell) == 'borrowernumber' %]
+
+ [% cells.cell | $raw %]
+
+
+ [% ELSIF header_row.$place.cell == 'cardnumber' || header_types.item(header_row.$place.cell) == 'cardnumber' %]
+
+ [% cells.cell | $raw %]
+
+
+ [% ELSE %]
+ [% cells.cell | $raw %]
+ [% END %]
+ [% END %]
+
+ [% END %]
+
+
+ [% END %]
+
+
+ [% INCLUDE 'chart.inc' %]
+ [% END #/IF ( execute ) %]
+
+ [% IF ( create ) %]
+ Create from SQL
+
+ [% INCLUDE 'csrf-token.inc' %]
+
+ Create report from SQL
+
+
+ Report name:
+ [% IF ( reportname ) %]
+
+ [% ELSE %]
+
+ [% END %]
+ Required
+
+ [% PROCESS group_and_subgroup_selection %]
+
+ [% IF (public) %]
+
+ Report is public:
+
+ No (default)
+ Yes
+
+
+ [% ELSE %]
+
+ Report is public:
+
+ No (default)
+ Yes
+
+
+ [% END # /IF (public) %]
+
+ [% IF (usecache) %]
+
+ Cache expiry:
+
+
+ Seconds (default)
+ Minutes
+ Hours
+ Days
+
+
+ [% END # /IF (usecache) %]
+
+ Notes:
+ [% notes | scrub_html type => 'note' | $raw %]
+
+
+
+
+
+ [% IF ( Koha.Preference('LimitReportsByLibrary') && ( CAN_user_superlibrarian || CAN_user_reports_manage_report_limits ) ) %]
+
+ Library limitation:
+
+
Library limitation:
+
+ [% PROCESS options_for_libraries libraries => Branches.all( selected => report.get_library_limits, unfiltered => 1, do_not_select_my_library => 1 ) %]
+
+
Limits the use of this report to the selected libraries.
+
+
+ [% END %]
+
+
+ SQL:
+
+ [% PROCESS insert_runtime_parameter %]
+ [% sql | html %]
+ * In order to achieve auto-complete for columns, please prepend the column name with the table name, followed by a period. For example: 'borrowers.surname'
+
+ Required
+
+
+
+
+
+
+ Cancel
+
+
+ [% END #/IF ( create ) %]
+
+ [% IF saved_results %]
+
Saved report results
+
[% name | html %]
+
[% notes | scrub_html type => 'note' | $raw %]
+
+ [% FOREACH rows IN saved_results %]
+
+ [% FOREACH col IN rows %]
+ [% col | html %]
+ [% END %]
+
+ [% END %]
+
+ [% END # /IF saved_results %]
+
+ [% IF ( showsql ) %]
+
Saved reports - SQL
+
+ [% reportname | html %]
+
+ [% IF ( notes ) %]
+
+ Notes:
+ [% notes | scrub_html type => 'note' | $raw %]
+
+ [% ELSE %]
+
+ [% END %]
+
+ [% sql | html %]
+
+
+
+ [% END # /IF ( showsql ) %]
+
+ [% IF ( save_successful ) %]
+ [% UNLESS ( errors ) %]
+
+
+ [% IF ( reportname ) %]
+
Your report "[% reportname | html %]" has been saved
+ [% ELSE %]
+
Your report has been saved without a title
+ [% END %]
+
+ [% END %]
+ [% END %]
+
+ [% IF ( editsql ) %]
+
+ [% INCLUDE 'csrf-token.inc' %]
+
+
+ Edit SQL report
+
+
+ Report name:
+
+ Required
+
+ [% PROCESS group_and_subgroup_selection %]
+ [% IF (public) %]
+
+ Report is public:
+
+ No (default)
+ Yes
+
+
+ [% ELSE %]
+
+ Report is public:
+
+ No (default)
+ Yes
+
+
+ [% END # /IF (public) %]
+
+ [% IF (usecache) %]
+
+ Cache expiry:
+
+
+ Seconds (default)
+ Minutes
+ Hours
+ Days
+
+
+ [% END %]
+
+ Notes:
+ [% notes | scrub_html type => 'note' | $raw %]
+
+
+
+
+
+ [% IF ( Koha.Preference('LimitReportsByLibrary') && ( CAN_user_superlibrarian || CAN_user_reports_manage_report_limits ) ) %]
+
+ Library limitation:
+ Library limitation:
+
+ [% PROCESS options_for_libraries libraries => Branches.all( selected => report.get_library_limits, unfiltered => 1, do_not_select_my_library => 1 ) %]
+
+
Limits the use of this report to the selected libraries.
+
+
+ [% END %]
+
+
+ SQL:
+ [% PROCESS insert_runtime_parameter %]
+ [% sql | html %]
+ * In order to achieve auto-complete for columns, please prepend the column name with the table name, followed by a period. For example: 'borrowers.surname'
+
+ Required
+
+
+
+ Update SQL
+ [% IF ( CAN_user_reports_create_reports && CAN_user_reports_execute_reports ) %]
+ [% INCLUDE 'throttled-button.inc' element_type='button' classes='btn btn-default' label=t('Update and run SQL') attrs={ name => 'op', value => 'cud-update_and_run_sql' } %]
+ [% END %]
+ Cancel
+
+
+ [% END # /IF ( editsql ) %]
+
+ [% IF ( errors ) %]
+
+
+
The following error was encountered:
+ [% FOREACH error IN errors %]
+ [% IF ( error.duplicate_running_report ) %]
+
This report is already running. Please wait for it to finish before running it again.
+ [% ELSIF ( error.total_running_reports_limit_exceeded ) %]
+
You have too many reports running at the moment. Please wait for some of them to finish before running this report again.
+ [% ELSIF ( error.sqlerr ) %]
+
This report contains an SQL keyword: [% error.sqlerr | html %] .
+
Use of this keyword is not allowed in Koha reports due to security and data integrity risks. Only SELECT queries are allowed.
+
Please delete this report or retry creating a new one.
+ [% ELSIF ( error.queryerr ) %]
+
SQL error:
+
[% error.queryerr | html %]
+
Please check the log for further details.
+ [% ELSIF ( error.cache_expiry ) %]
+
Please select a cache expiry less than 30 days.
+ [% ELSIF ( error.passworderr ) %]
+
The column selection in this report includes a password field.
+
The report cannot be executed due to security risks. Please edit this report and ensure no password columns have been selected.
+ [% ELSE %]
+
+ [% END %]
+
+ [% END %]
+
+
+
+
+
+
+ [% END # /IF ( errors ) %]
[% END %]