View | Details | Raw Unified | Return to bug 40287
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt (-32 / +49 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE Branches %]
4
[% USE ItemTypes %]
5
[% USE KohaDates %]
6
[% USE AuthorisedValues %]
3
[% PROCESS 'i18n.inc' %]
7
[% PROCESS 'i18n.inc' %]
4
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
Lines 46-83 Link Here
46
    [% IF ( do_it ) %]
50
    [% IF ( do_it ) %]
47
        [% FOREACH mainloo IN mainloop %]
51
        [% FOREACH mainloo IN mainloop %]
48
            [% IF ( mainloo.loopfilter.size ) %]
52
            [% IF ( mainloo.loopfilter.size ) %]
49
                <p><strong>Filtered on:</strong></p>
53
                <h2>Filtered on:</h2>
50
                [% FOREACH loopfilte IN mainloo.loopfilter %]
54
                <ul>
51
                    <p>
55
                    [% FOREACH loopfilte IN mainloo.loopfilter %]
52
                        [% SWITCH loopfilte.crit %]
56
                        <li>
53
                        [% CASE '0' %]
57
                            [% SWITCH loopfilte.crit %]
54
                            <span>Placed on (from)</span>
58
                            [% CASE '0' %]
55
                        [% CASE '1' %]
59
                                <strong>Placed on (from): </strong>
56
                            <span>Placed on (to)</span>
60
                                [% loopfilte.filter | $KohaDates %]
57
                        [% CASE '2' %]
61
                            [% CASE '1' %]
58
                            <span>Received on (from)</span>
62
                                <strong>Placed on (to): </strong>
59
                        [% CASE '3' %]
63
                                [% loopfilte.filter | $KohaDates %]
60
                            <span>Received on (to)</span>
64
                            [% CASE '2' %]
61
                        [% CASE '4' %]
65
                                <strong>Received on (from): </strong>
62
                            <span>Vendor</span>
66
                                [% loopfilte.filter | html %]
63
                        [% CASE '5' %]
67
                            [% CASE '3' %]
64
                            <span>Home library</span>
68
                                <strong>Received on (to): </strong>
65
                        [% CASE '6' %]
69
                                [% loopfilte.filter | html %]
66
                            <span>Collection</span>
70
                            [% CASE '4' %]
67
                        [% CASE '7' %]
71
                                <strong>Vendor: </strong>
68
                            <span>Item type</span>
72
                                [% loopfilte.filter | html %]
69
                        [% CASE '8' %]
73
                            [% CASE '5' %]
70
                            <span>Fund</span>
74
                                <strong>Home library: </strong>
71
                        [% CASE '9' %]
75
                                [% Branches.GetName( loopfilte.filter ) | html %]
72
                            <span>Sort1</span>
76
                            [% CASE '6' %]
73
                        [% CASE '10' %]
77
                                <strong>Collection: </strong>
74
                            <span>Sort2</span>
78
                                [% AuthorisedValues.GetByCode( 'CCODE', loopfilte.filter ) | html %]
75
                        [% CASE %]
79
                            [% CASE '7' %]
76
                            <span>Unknown filter</span>
80
                                <strong>Item type: </strong>
77
                        [% END %]
81
                                [% ItemTypes.GetDescription( loopfilte.filter ) | html %]
78
                        : [% loopfilte.filter | html %]
82
                            [% CASE '8' %]
79
                    </p>
83
                                <strong>Fund: </strong>
80
                [% END %]
84
                                [% loopfilte.filter | html %]
85
                            [% CASE '9' %]
86
                                <strong>Sort1: </strong>
87
                                [% loopfilte.filter | html %]
88
                            [% CASE '10' %]
89
                                <strong>Sort2: </strong>
90
                                [% loopfilte.filter | html %]
91
                            [% CASE %]
92
                                <strong>Unknown filter: </strong>
93
                                [% loopfilte.filter | html %]
94
                            [% END %]
95
                        </li>
96
                    [% END %]
97
                </ul>
81
            [% END %]
98
            [% END %]
82
            <div class="page-section">
99
            <div class="page-section">
83
                <table>
100
                <table>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt (-7 / +75 lines)
Lines 2-7 Link Here
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE Asset %]
4
[% USE Asset %]
5
[% USE Categories %]
6
[% USE KohaDates %]
7
[% USE AuthorisedValues %]
8
[% USE ExtendedAttributeTypes %]
5
[% PROCESS 'i18n.inc' %]
9
[% PROCESS 'i18n.inc' %]
6
[% SET footerjs = 1 %]
10
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
11
[% INCLUDE 'doc-head-open.inc' %]
Lines 56-66 Link Here
56
    <h1>Patrons statistics</h1>
60
    <h1>Patrons statistics</h1>
57
    [% IF ( do_it ) %]
61
    [% IF ( do_it ) %]
58
        [% FOREACH mainloo IN mainloop %]
62
        [% FOREACH mainloo IN mainloop %]
59
            [% IF ( mainloo.loopfilter.size>0 ) %]
63
            [% IF ( mainloo.loopfilter.size > 0 ) %]
60
                <p>Filtered on:</p>
64
                <h2>Filtered on:</h2>
61
                [% FOREACH loopfilte IN mainloo.loopfilter %]
65
                <ul>
62
                    <p> [% loopfilte.crit | html %] = [% loopfilte.filter | html %] </p>
66
                    [% FOREACH loopfilte IN mainloo.loopfilter %]
63
                [% END %]
67
                        <li>
68
                            [% SWITCH loopfilte.crit %]
69
                            [% CASE 'Cat code' %]
70
                                <strong>Patron category:</strong>
71
                                [% Categories.GetName( loopfilte.filter ) | html %]
72
                            [% CASE 'ZIP/Postal code' %]
73
                                <strong>ZIP/Postal code: </strong>
74
                                [% loopfilte.filter | html %]
75
                            [% CASE 'Branch code' %]
76
                                <strong>Library: </strong>
77
                                [% Branches.GetName( loopfilte.filter ) | html %]
78
                            [% CASE 'Date of birth1' %]
79
                                <strong>Date of birth > </strong>
80
                                [% loopfilte.filter | html %]
81
                            [% CASE 'Date of birth2' %]
82
                                <strong>Date of birth < </strong>
83
                                [% loopfilte.filter | html %]
84
                            [% CASE 'Sex' %]
85
                                <strong>Gender: </strong>
86
                                [% SWITCH ( loopfilte.filter ) %]
87
                                [% CASE 'F' %]
88
                                    <span>Female</span>
89
                                [% CASE 'M' %]
90
                                    <span>Male</span>
91
                                [% CASE 'O' %]
92
                                    <span>Other</span>
93
                                [% CASE %]
94
                                    <span>None specified</span>
95
                                [% END %]
96
                            [% CASE 'Sort1' %]
97
                                <strong>Patron sort1:</strong> [% AuthorisedValues.GetByCode('Bsort1', loopfilte.filter ) | html %]
98
                            [% CASE 'Sort2' %]
99
                                <strong>Patron sort2:</strong> [% AuthorisedValues.GetByCode('Bsort2', loopfilte.filter ) | html %]
100
                            [% CASE 'Status' %]
101
                                <strong>Status: </strong>
102
                                [% SWITCH loopfilte.filter %]
103
                                [% CASE 'debarred' %]
104
                                    <span>Restricted</span>
105
                                [% CASE 'gonenoaddress' %]
106
                                    <span>Gone no address</span>
107
                                [% CASE 'lost' %]
108
                                    <span>Lost card</span>
109
                                [% CASE %]
110
                                    [% loopfilte.filter | html %]
111
                                [% END %]
112
                            [% CASE 'Activity' %]
113
                                <strong>Activity: </strong>
114
                                [% SWITCH loopfilte.filter %]
115
                                [% CASE 'active' %]
116
                                    <span>Active</span>
117
                                [% CASE 'nonactive' %]
118
                                    <span>Inactive</span>
119
                                [% CASE %]
120
                                    [% loopfilte.filter | html %]
121
                                [% END %]
122
                            [% CASE "PA_CLASS" %]
123
                                <strong>[% loopfilte.label | html %]:</strong>
124
                                [% loopfilte.filter | html %]
125
                            [% CASE %]
126
                                <strong>[% loopfilte.crit | html %]: </strong>
127
                                [% loopfilte.filter | html %]
128
                            [% END %]
129
                        </li>
130
                    [% END %]
131
                </ul>
64
            [% END %]
132
            [% END %]
65
            <div class="page-section">
133
            <div class="page-section">
66
                <table>
134
                <table>
Lines 227-233 Link Here
227
                                    <select id="sort1" name="Filter">
295
                                    <select id="sort1" name="Filter">
228
                                        <option value="" />
296
                                        <option value="" />
229
                                        [% FOREACH SORT1_LOO IN SORT1_LOOP %]
297
                                        [% FOREACH SORT1_LOO IN SORT1_LOOP %]
230
                                            <option value="[% SORT1_LOO.authorized_value | html %]">[% SORT1_LOO.lib | html %]</option>
298
                                            <option value="[% SORT1_LOO.authorised_value | html %]">[% SORT1_LOO.lib | html %]</option>
231
                                        [% END %]
299
                                        [% END %]
232
                                    </select>
300
                                    </select>
233
                                </td>
301
                                </td>
Lines 244-250 Link Here
244
                                    <select id="sort2" name="Filter">
312
                                    <select id="sort2" name="Filter">
245
                                        <option value="" />
313
                                        <option value="" />
246
                                        [% FOREACH SORT2_LOO IN SORT2_LOOP %]
314
                                        [% FOREACH SORT2_LOO IN SORT2_LOOP %]
247
                                            <option value="[% SORT2_LOO.value | html %]">[% SORT2_LOO.value | html %]</option>
315
                                            <option value="[% SORT2_LOO.value | html %]">[% AuthorisedValues.GetByCode('Bsort2', SORT2_LOO.value ) | html %]</option>
248
                                        [% END %]
316
                                        [% END %]
249
                                    </select>
317
                                    </select>
250
                                </td>
318
                                </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt (-4 / +46 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% USE ItemTypes %]
5
[% USE AuthorisedValues %]
4
[% PROCESS 'i18n.inc' %]
6
[% PROCESS 'i18n.inc' %]
5
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
Lines 46-57 Link Here
46
    <h1>Catalog statistics</h1>
48
    <h1>Catalog statistics</h1>
47
    [% IF ( do_it ) %]
49
    [% IF ( do_it ) %]
48
        [% FOREACH mainloo IN mainloop %]
50
        [% FOREACH mainloo IN mainloop %]
49
            [% IF ( mainloo.loopfilter ) %]
51
            <h2>Filtered on:</h2>
50
                <p>Filtered on:</p>
52
            <ul>
51
                [% FOREACH loopfilte IN mainloo.loopfilter %]
53
                [% FOREACH loopfilte IN mainloo.loopfilter %]
52
                    <p>[% loopfilte.crit | html %] =[% loopfilte.filter | html %]</p>
54
                    <li>
55
                        [% SWITCH loopfilte.crit %]
56
                        [% CASE "Item CallNumber From" %]
57
                            <strong>Item call number from:</strong> [% loopfilte.filter | html %]
58
                        [% CASE "Item CallNumber To" %]
59
                            <strong>Item call number to:</strong> [% loopfilte.filter | html %]
60
                        [% CASE "Item type" %]
61
                            <strong>Item type:</strong> [% ItemTypes.GetDescription( loopfilte.filter ) | html %]
62
                        [% CASE "Publisher" %]
63
                            <strong>Publisher:</strong> [% loopfilte.filter | html %]
64
                        [% CASE "Publication year From" %]
65
                            <strong>Publication year from:</strong> [% loopfilte.filter | html %]
66
                        [% CASE "Publication year To" %]
67
                            <strong>Publication year to:</strong> [% loopfilte.filter | html %]
68
                        [% CASE "Library" %]
69
                            <strong>Library:</strong> [% Branches.GetName( loopfilte.filter ) | html %]
70
                        [% CASE "Shelving Location" %]
71
                            <strong>Location:</strong> [% AuthorisedValues.GetByCode( 'LOC', loopfilte.filter ) | html %]
72
                        [% CASE "Collection Code" %]
73
                            <strong>Collection:</strong> [% AuthorisedValues.GetByCode( 'CCODE', loopfilte.filter ) | html %]
74
                        [% CASE "Status" %]
75
                            <strong>Not for loan:</strong> [% AuthorisedValues.GetByCode( 'NOT_LOAN', loopfilte.filter ) | html %]
76
                        [% CASE "Materials" %]
77
                            <strong>Materials specified:</strong> [% loopfilte.filter | html %]
78
                        [% CASE "Barcode (not like)" %]
79
                            <strong>Barcode (not like):</strong> [% loopfilte.filter | html %]
80
                        [% CASE "Barcode (like)" %]
81
                            <strong>Barcode (like):</strong> [% loopfilte.filter | html %]
82
                        [% CASE "Date acquired (item) from" %]
83
                            <strong>Date acquired (item) from:</strong> [% loopfilte.filter | html %]
84
                        [% CASE "Date acquired (item) to" %]
85
                            <strong>Date acquired (item) to:</strong> [% loopfilte.filter | html %]
86
                        [% CASE "Date deleted (item) from" %]
87
                            <strong>Date deleted (item) from:</strong> [% loopfilte.filter | html %]
88
                        [% CASE "Date deleted (item) to" %]
89
                            <strong>Date deleted (item) to:</strong> [% loopfilte.filter | html %]
90
                        [% CASE %]
91
                            <strong>[% loopfilte.crit | html %]:</strong>
92
                            [% loopfilte.filter | html %]
93
                        [% END %]
94
                    </li>
53
                [% END %]
95
                [% END %]
54
            [% END %]
96
            </ul>
55
97
56
            <div class="page-section">
98
            <div class="page-section">
57
                <table id="catalogue_stats">
99
                <table id="catalogue_stats">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt (-2 / +7 lines)
Lines 3-9 Link Here
3
[% USE Branches %]
3
[% USE Branches %]
4
[% USE Categories %]
4
[% USE Categories %]
5
[% USE ItemTypes %]
5
[% USE ItemTypes %]
6
[% USE KohaDates %]
6
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
8
[% USE ExtendedAttributeTypes %]
7
[% PROCESS 'i18n.inc' %]
9
[% PROCESS 'i18n.inc' %]
8
[% SET footerjs = 1 %]
10
[% SET footerjs = 1 %]
9
[% INCLUDE 'doc-head-open.inc' %]
11
[% INCLUDE 'doc-head-open.inc' %]
Lines 55-61 Link Here
55
    [% IF ( do_it ) %]
57
    [% IF ( do_it ) %]
56
        [% FOREACH mainloo IN mainloop %]
58
        [% FOREACH mainloo IN mainloop %]
57
            [% IF ( mainloo.loopfilter ) %]
59
            [% IF ( mainloo.loopfilter ) %]
58
                <p>Filtered on:</p>
60
                <h2>Filtered on:</h2>
59
                <ul>
61
                <ul>
60
                    [% FOREACH loopfilte IN mainloo.loopfilter %]
62
                    [% FOREACH loopfilte IN mainloo.loopfilter %]
61
                        [% SET li_class = '' %]
63
                        [% SET li_class = '' %]
Lines 127-134 Link Here
127
                                [% CASE "4" %]
129
                                [% CASE "4" %]
128
                                    <span>Hour</span>
130
                                    <span>Hour</span>
129
                                [% END %]
131
                                [% END %]
132
                            [% CASE "PA_CLASS" %]
133
                                <strong>[% loopfilte.label | html %]:</strong>
134
                                [% loopfilte.filter | html %]
130
                            [% CASE %]
135
                            [% CASE %]
131
                                [% loopfilte.crit | html %]:
136
                                <strong>[% loopfilte.crit | html %]:</strong>
132
                                [% loopfilte.filter | html %]
137
                                [% loopfilte.filter | html %]
133
                            [% END %]
138
                            [% END %]
134
                        </li>
139
                        </li>
(-)a/reports/borrowers_stats.pl (-9 / +12 lines)
Lines 193-214 sub calculate { Link Here
193
    foreach my $i ( 0 .. scalar @$filters ) {
193
    foreach my $i ( 0 .. scalar @$filters ) {
194
        my %cell;
194
        my %cell;
195
        if ( @$filters[$i] ) {
195
        if ( @$filters[$i] ) {
196
            if    ( $i == 0 )            { $cell{crit} = "Cat code";        $cell{filter} = @$filters[$i]; }
196
            if    ( $i == 0 ) { $cell{crit} = "Cat code";        $cell{filter} = @$filters[$i]; }
197
            elsif ( $i == 1 )            { $cell{crit} = "ZIP/Postal code"; $cell{filter} = @$filters[$i]; }
197
            elsif ( $i == 1 ) { $cell{crit} = "ZIP/Postal code"; $cell{filter} = @$filters[$i]; }
198
            elsif ( $i == 2 )            { $cell{crit} = "Branch code";     $cell{filter} = @$filters[$i]; }
198
            elsif ( $i == 2 ) { $cell{crit} = "Branch code";     $cell{filter} = @$filters[$i]; }
199
            elsif ( $i == 3 || $i == 4 ) { $cell{crit} = "Date of birth";   $cell{filter} = @$filters[$i]; }
199
            elsif ( $i == 3 ) { $cell{crit} = "Date of birth1";  $cell{filter} = @$filters[$i]; }
200
            elsif ( $i == 5 )            { $cell{crit} = "Sex";             $cell{filter} = @$filters[$i]; }
200
            elsif ( $i == 4 ) { $cell{crit} = "Date of birth2";  $cell{filter} = @$filters[$i]; }
201
            elsif ( $i == 6 )            { $cell{crit} = "Sort1";           $cell{filter} = @$filters[$i]; }
201
            elsif ( $i == 5 ) { $cell{crit} = "Sex";             $cell{filter} = @$filters[$i]; }
202
            elsif ( $i == 7 )            { $cell{crit} = "Sort2";           $cell{filter} = @$filters[$i]; }
202
            elsif ( $i == 6 ) { $cell{crit} = "Sort1";           $cell{filter} = @$filters[$i]; }
203
            else                         { $cell{crit} = "Unknown"; }
203
            elsif ( $i == 7 ) { $cell{crit} = "Sort2";           $cell{filter} = @$filters[$i]; }
204
            else              { $cell{crit} = "Unknown"; }
204
205
205
            push @loopfilter, \%cell;
206
            push @loopfilter, \%cell;
206
        }
207
        }
207
    }
208
    }
208
    foreach my $type ( keys %$attr_filters ) {
209
    foreach my $type ( keys %$attr_filters ) {
209
        if ( $attr_filters->{$type} ) {
210
        if ( $attr_filters->{$type} ) {
211
            my $patron_attribute_type = Koha::Patron::Attribute::Types->find($type);
210
            push @loopfilter, {
212
            push @loopfilter, {
211
                crit   => "Attribute $type",
213
                crit   => "PA_CLASS",
214
                label  => $patron_attribute_type->description,
212
                filter => $attr_filters->{$type}
215
                filter => $attr_filters->{$type}
213
            };
216
            };
214
        }
217
        }
(-)a/reports/issues_stats.pl (-4 / +11 lines)
Lines 230-239 sub calculate { Link Here
230
230
231
        push @loopfilter, \%cell;
231
        push @loopfilter, \%cell;
232
    }
232
    }
233
    foreach ( keys %$attribute_filters ) {
233
234
        next unless $attribute_filters->{$_};
234
    foreach my $type ( keys %$attribute_filters ) {
235
        push @loopfilter, { crit => "$_ =", filter => $attribute_filters->{$_} };
235
        if ( $attribute_filters->{$type} ) {
236
            my $patron_attribute_type = Koha::Patron::Attribute::Types->find($type);
237
            push @loopfilter, {
238
                crit   => "PA_CLASS",
239
                label  => $patron_attribute_type->description,
240
                filter => $attribute_filters->{$type}
241
            };
242
        }
236
    }
243
    }
244
237
    push @loopfilter, { crit => "Event",        filter => $type };
245
    push @loopfilter, { crit => "Event",        filter => $type };
238
    push @loopfilter, { crit => "Display by",   filter => $dsp }      if ($dsp);
246
    push @loopfilter, { crit => "Display by",   filter => $dsp }      if ($dsp);
239
    push @loopfilter, { crit => "Select Day",   filter => $daysel }   if ($daysel);
247
    push @loopfilter, { crit => "Select Day",   filter => $daysel }   if ($daysel);
240
- 

Return to bug 40287