@@ -, +, @@ - Acquisitions statistic wizard: Linked pairs of fields for "placed on" and "received on." - Patrons with the most checkouts: Linked pairs of fields for "Checkout date from" and "Check-in date from" - Patrons who haven't checked out: "Not checked out since" field. - Cash register statistics wizard: Linked "From" and "To" fields. - Most-circulated items: Linked pairs of fields for "Checkout date from" and "Check-in date from" - Catalog statistics wizard: Linked pairs of fields for "Date acquired (item)" and "Date deleted (item)" The latter is shown by checking the "Count deleted items" radio button. - View dictionary -> New definition: - Enter a definition name - Select table Circulation - Choose a date column, e.g. "Date of birth" or "Registration date" - Select "Date range" - Test that the "Start of date range" and "End of date range" fields are linked correctly. - Create guided report: - Module: catalog - Type: Tabular - Select columns (any) - Select criteria to limit on: There should be three pairs of linked fields, "Creation date," "Modification date," and "Due date." - Confirm that the report is saved correctly with the dates you chose. - Create from SQL -> Test a report with one or more date fields, e.g. https://wiki.koha-community.org/wiki/SQL_Reports_Library#Items_added_by_Collection - Average loan time: Linke pairs of fields for "Checkout date" and "Returns." - Reports -> Circulation statistics wizard: Linked "Period" fields. - Reports -> Holds statistics wizard: Linked pairs of fields "Hold date," "Notification date," "Reminder date," "Waiting date," and "Cancellation date." --- .../prog/en/includes/calendar.inc | 3 + .../en/modules/reports/acquisitions_stats.tt | 64 ++++---- .../prog/en/modules/reports/bor_issues_top.tt | 63 ++++---- .../prog/en/modules/reports/borrowers_out.tt | 7 +- .../en/modules/reports/cash_register_stats.tt | 4 +- .../prog/en/modules/reports/cat_issues_top.tt | 62 +++---- .../en/modules/reports/catalogue_stats.tt | 42 +++-- .../prog/en/modules/reports/dictionary.tt | 4 +- .../modules/reports/guided_reports_start.tt | 27 +++- .../en/modules/reports/issues_avg_stats.tt | 56 +++---- .../prog/en/modules/reports/issues_stats.tt | 11 +- .../prog/en/modules/reports/reserves_stats.tt | 152 +++++++++--------- 12 files changed, 272 insertions(+), 223 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -34,6 +34,9 @@ if( $(instance.input).hasClass("futuredate") ){ instance.set("minDate", new Date().fp_incr(1)); } + if( $(instance.input).hasClass("pastdate") ){ + instance.set("maxDate", new Date().fp_incr(-1)); + } $(instance.input) /* Add a wrapper element so that we can prevent the clear button from wrapping */ .wrap("") --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt @@ -119,11 +119,12 @@ Placed on - From - [% INCLUDE 'date-format.inc' %] - To - [% INCLUDE 'date-format.inc' %] - + + From + [% INCLUDE 'date-format.inc' %] + To + [% INCLUDE 'date-format.inc' %] +   @@ -141,11 +142,12 @@ Received on - From - [% INCLUDE 'date-format.inc' %] - To - [% INCLUDE 'date-format.inc' %] - + + From + [% INCLUDE 'date-format.inc' %] + To + [% INCLUDE 'date-format.inc' %] +   @@ -339,33 +341,29 @@ [% INCLUDE 'calendar.inc' %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt @@ -117,12 +117,21 @@

Patrons with the most checkouts

-
  1. - - [% INCLUDE 'date-format.inc' %]
  2. -
  3. - - [% INCLUDE 'date-format.inc' %]
  4. +
      +
    1. + + + + + [% INCLUDE 'date-format.inc' %] +
    2. +
    3. + + + + + [% INCLUDE 'date-format.inc' %] +
    4. -
    5. +
@@ -143,11 +143,6 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] - [% END %] [% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt @@ -58,12 +58,12 @@
  • - +
    [% INCLUDE 'date-format.inc' %]
  • - +
    [% INCLUDE 'date-format.inc' %]
  • --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt @@ -95,12 +95,20 @@
      -
    1. - - [% INCLUDE 'date-format.inc' %]
    2. -
    3. - - [% INCLUDE 'date-format.inc' %]
    4. +
    5. + + + + + [% INCLUDE 'date-format.inc' %] +
    6. +
    7. + + + + + [% INCLUDE 'date-format.inc' %] +
    8. - + - + @@ -263,9 +263,9 @@ - + - + @@ -353,16 +353,30 @@ } $(document).ready(function() { - $('#acqdateFrom, #deldateFrom') - .datepicker('option', 'onSelect', function(selectedDate) { - var id = $(this).attr('id').replace('From', 'To'); - $('#' + id).datepicker('option', 'minDate', selectedDate); - }); - $('#acqdateTo, #deldateTo') - .datepicker('option', 'onSelect', function(selectedDate) { - var id = $(this).attr('id').replace('To', 'From'); - $('#' + id).datepicker('option', 'maxDate', selectedDate); - }); + + var acqdateFrom = $("#acqdateFrom").flatpickr({ + onClose: function( selectedDates, dateText, instance) { + validate_date( selectedDates, instance ); + acqdateTo.set('minDate', selectedDates[0]); + } + }); + var acqdateTo = $("#acqdateTo").flatpickr({ + onClose: function( selectedDates, dateText, instance) { + validate_date( selectedDates, instance ); + }, + }); + + var deldateFrom = $("#deldateFrom").flatpickr({ + onClose: function( selectedDates, dateText, instance) { + validate_date( selectedDates, instance ); + deldateTo.set('minDate', selectedDates[0]); + } + }); + var deldateTo = $("#deldateTo").flatpickr({ + onClose: function( selectedDates, dateText, instance) { + validate_date( selectedDates, instance ); + }, + }); $("input[name='Cellvalue']").change(function() { changeRemovedDateTrStatus(); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -259,10 +259,10 @@
    9. Start of date range - +
      [% INCLUDE 'date-format.inc' %]
      End of date range - +
      [% INCLUDE 'date-format.inc' %]
    10. [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -603,7 +603,7 @@ [% IF ( criteri.date ) %] - + [% INCLUDE 'date-format.inc' %] @@ -619,9 +619,9 @@ [% IF ( criteri.daterange ) %] from - + to - + [% INCLUDE 'date-format.inc' %] @@ -858,7 +858,7 @@ [% IF sql_param.input == 'date' %]
    11. - +
    12. [% ELSIF ( sql_param.input == 'text' ) %]
    13. @@ -1320,7 +1320,7 @@
      1. - +
        [% INCLUDE 'date-format.inc' %]
      2. @@ -2189,6 +2189,23 @@ readOnly: true }); } + [% IF ( build4 ) %] + [% FOREACH criteri IN criteria %] + [% IF ( criteri.daterange ) %] + var from_[% criteri.name.remove('\.') | html %]_value = $("#from_[% criteri.name.remove('\.') | html %]_value").flatpickr({ + onClose: function( selectedDates, dateText, instance) { + validate_date( selectedDates, instance ); + to_[% criteri.name.remove('\.') | html %]_value.set('minDate', selectedDates[0]); + } + }); + var to_[% criteri.name.remove('\.') | html %]_value = $("#to_[% criteri.name.remove('\.') | html %]_value").flatpickr({ + onClose: function( selectedDates, dateText, instance) { + validate_date( selectedDates, instance ); + }, + }); + [% END %] + [% END %] + [% END %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt @@ -103,8 +103,11 @@ Checkout date - - + + + + + [% INCLUDE 'date-format.inc' %] @@ -124,8 +127,11 @@ Returns - - + + + + + [% INCLUDE 'date-format.inc' %] @@ -262,33 +268,29 @@ [% INCLUDE 'calendar.inc' %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt @@ -126,11 +126,14 @@ Period - - + + + + + [% INCLUDE 'date-format.inc' %] - - + + - - - - + + + + + + + Notification date - - - + + + + + + Reminder date - - - + + + + + + Waiting date - - - + + + + + + Cancellation date - - - + + + + + + Patron category @@ -325,72 +340,65 @@ [% INCLUDE 'calendar.inc' %] [% END %] --