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

(-)a/Koha/Account/DebitType.pm (-1 / +15 lines)
Lines 23-29 use List::Util qw/any/; Link Here
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::Exceptions;
24
use Koha::Exceptions;
25
25
26
use base qw(Koha::Object);
26
use base qw(Koha::Object Koha::Object::Limit::Library);
27
27
28
=head1 NAME
28
=head1 NAME
29
29
Lines 82-87 sub defaults { Link Here
82
    return \@defaults;
82
    return \@defaults;
83
}
83
}
84
84
85
=head3 _library_limits
86
87
Configurable library limits
88
89
=cut
90
91
sub _library_limits {
92
    return {
93
        class   => "AcDebitTypesBranch",
94
        id      => "debit_type_code",
95
        library => "branchcode",
96
    };
97
}
98
85
=head3 type
99
=head3 type
86
100
87
=cut
101
=cut
(-)a/Koha/Account/DebitTypes.pm (-1 / +1 lines)
Lines 23-29 use List::Util qw/any/; Link Here
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::Account::DebitType;
24
use Koha::Account::DebitType;
25
25
26
use base qw(Koha::Objects);
26
use base qw(Koha::Objects Koha::Objects::Limit::Library);
27
27
28
=head1 NAME
28
=head1 NAME
29
29
(-)a/admin/debit_types.pl (+146 lines)
Line 0 Link Here
1
#! /usr/bin/perl
2
3
# Copyright 2016 Koha Development Team
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
22
use C4::Context;
23
use C4::Auth;
24
use C4::Output;
25
26
use Koha::Account::DebitTypes;
27
28
my $input = new CGI;
29
my $code  = $input->param('code');
30
my $op    = $input->param('op') || 'list';
31
my $type  = $input->param('type');
32
my @messages;
33
34
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
35
    {
36
        template_name   => "admin/debit_types.tt",
37
        query           => $input,
38
        type            => "intranet",
39
        authnotrequired => 0,
40
        flagsrequired   => { parameters => 'parameters_remaining_permissions' },
41
        debug           => 1,
42
    }
43
);
44
45
if ( $op eq 'add_form' ) {
46
    my $debit_type;
47
    if ($code) {
48
        $debit_type = Koha::Account::DebitTypes->find($code);
49
    }
50
51
    my $selected_branches =
52
      $debit_type ? $debit_type->get_library_limits : undef;
53
    my $branches =
54
      Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed;
55
    my @branches_loop;
56
    foreach my $branch (@$branches) {
57
        my $selected =
58
          ( $selected_branches
59
              && grep { $_->branchcode eq $branch->{branchcode} }
60
              @{ $selected_branches->as_list } ) ? 1 : 0;
61
        push @branches_loop,
62
          {
63
            branchcode => $branch->{branchcode},
64
            branchname => $branch->{branchname},
65
            selected   => $selected,
66
          };
67
    }
68
69
    $template->param(
70
        debit_type    => $debit_type,
71
        type          => $type,
72
        branches_loop => \@branches_loop
73
    );
74
}
75
elsif ( $op eq 'add_validate' ) {
76
    my $description = $input->param('description');
77
    my $can_be_added_manually = $input->param('can_be_added_manually') || 0;
78
    my $default_amount;
79
    if ( $type eq "debit" ) {
80
        $default_amount = $input->param('default_amount') || undef;
81
    }
82
    my @branches = grep { $_ ne q{} } $input->multi_param('branches');
83
84
    my $debit_type;
85
    $debit_type = Koha::Account::DebitTypes->find($code);
86
    if ( not defined $debit_type ) {
87
        $debit_type = Koha::Account::DebitType->new( { code => $code } );
88
    }
89
    $debit_type->description($description);
90
    $debit_type->can_be_added_manually($can_be_added_manually);
91
    $debit_type->default_amount($default_amount);
92
93
    eval {
94
        $debit_type->store;
95
        $debit_type->replace_library_limits( \@branches );
96
    };
97
    if ($@) {
98
        push @messages, { type => 'error', code => 'error_on_saving' };
99
    }
100
    else {
101
        push @messages, { type => 'message', code => 'success_on_saving' };
102
    }
103
    $op = 'list';
104
}
105
elsif ( $op eq 'delete_confirm' ) {
106
    my $debit_type;
107
    if ( $type eq "debit" ) {
108
        $debit_type = Koha::Account::DebitTypes->find($code);
109
    }
110
    else {
111
        $debit_type = Koha::Account::CreditTypes->find($code);
112
    }
113
    $template->param( debit_type => $debit_type );
114
    $template->param( type       => $type );
115
}
116
elsif ( $op eq 'delete_confirmed' ) {
117
    my $debit_type;
118
    if ( $type eq "debit" ) {
119
        $debit_type = Koha::Account::DebitTypes->find($code);
120
    }
121
    else {
122
        $debit_type = Koha::Account::CreditTypes->find($code);
123
    }
124
    my $deleted = eval { $debit_type->delete; };
125
126
    if ( $@ or not $deleted ) {
127
        push @messages, { type => 'error', code => 'error_on_delete' };
128
    }
129
    else {
130
        push @messages, { type => 'message', code => 'success_on_delete' };
131
    }
132
    $op = 'list';
133
}
134
135
if ( $op eq 'list' ) {
136
    my $debit_types = Koha::Account::DebitTypes->search();
137
    $template->param( debit_types => $debit_types );
138
}
139
140
$template->param(
141
    code     => $code,
142
    messages => \@messages,
143
    op       => $op,
144
);
145
146
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc (-2 / +5 lines)
Lines 51-60 Link Here
51
        </ul>
51
        </ul>
52
    [% END %]
52
    [% END %]
53
53
54
    [% IF ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_manage_cash_registers ) %]
54
    [% IF ( CAN_user_parameters_manage_accounts || ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_manage_cash_registers ) ) %]
55
        <h5>Accounting</h5>
55
        <h5>Accounting</h5>
56
        <ul>
56
        <ul>
57
            [% IF ( CAN_user_cash_management_manage_cash_registers ) %]
57
            [% IF ( CAN_user_parameters_manage_accounts ) %]
58
                <li><a href="/cgi-bin/koha/admin/debit_types.pl">Debit types</a></li>
59
            [% END %]
60
            [% IF ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_manage_cash_registers ) %]
58
                <li><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></li>
61
                <li><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></li>
59
            [% END %]
62
            [% END %]
60
        </ul>
63
        </ul>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt (-31 / +35 lines)
Lines 69-110 Link Here
69
            [% IF ( CAN_user_parameters_manage_patron_categories || CAN_user_parameters_manage_circ_rules || CAN_user_parameters_manage_patron_attributes || CAN_user_parameters_manage_transfers || CAN_user_parameters_manage_item_circ_alerts || CAN_user_parameters_manage_cities ) %]
69
            [% IF ( CAN_user_parameters_manage_patron_categories || CAN_user_parameters_manage_circ_rules || CAN_user_parameters_manage_patron_attributes || CAN_user_parameters_manage_transfers || CAN_user_parameters_manage_item_circ_alerts || CAN_user_parameters_manage_cities ) %]
70
                <h3>Patrons and circulation</h3>
70
                <h3>Patrons and circulation</h3>
71
                <dl>
71
                <dl>
72
                    [% IF ( CAN_user_parameters_manage_patron_categories ) %]
72
                [% IF ( CAN_user_parameters_manage_patron_categories ) %]
73
                        <dt><a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a></dt>
73
                    <dt><a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a></dt>
74
                        <dd>Define patron categories.</dd>
74
                    <dd>Define patron categories.</dd>
75
                    [% END %]
75
                [% END %]
76
                    [% IF ( CAN_user_parameters_manage_circ_rules ) %]
76
                [% IF CAN_user_parameters_manage_circ_rules %]
77
                        <dt><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></dt>
77
                    <dt><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></dt>
78
                        <dd>Define circulation and fines rules for combinations of libraries, patron categories, and item types</dd>
78
                    <dd>Define circulation and fines rules for combinations of libraries, patron categories, and item types</dd>
79
                    [% END %]
79
                [% END %]
80
                    [% IF ( CAN_user_parameters_manage_patron_attributes ) %]
80
                [% IF ( CAN_user_parameters_manage_patron_attributes ) %]
81
                        <dt><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></dt>
81
                    <dt><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></dt>
82
                        <dd>Define extended attributes (identifiers and statistical categories) for patron records</dd>
82
                    <dd>Define extended attributes (identifiers and statistical categories) for patron records</dd>
83
                    [% END %]
83
                [% END %]
84
                    [% IF ( CAN_user_parameters_manage_transfers ) %]
84
                [% IF ( CAN_user_parameters_manage_transfers ) %]
85
                        <dt><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library transfer limits</a></dt>
85
                    <dt><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library transfer limits</a></dt>
86
                        <dd>Limit the ability to transfer items between libraries based on the library sending, the library receiving, and the item type involved. These rules only go into effect if the preference UseBranchTransferLimits is set to ON.</dd>
86
                    <dd>Limit the ability to transfer items between libraries based on the library sending, the library receiving, and the item type involved. These rules only go into effect if the preference UseBranchTransferLimits is set to ON.</dd>
87
                        <dt><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></dt>
87
                    <dt><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></dt>
88
                        <dd>Define transport costs between branches</dd>
88
                    <dd>Define transport costs between branches</dd>
89
                    [% END %]
89
                [% END %]
90
                    [% IF ( CAN_user_parameters_manage_item_circ_alerts ) %]
90
                [% IF ( CAN_user_parameters_manage_item_circ_alerts ) %]
91
                        <dt><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></dt>
91
                    <dt><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></dt>
92
                        <dd>Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types</dd>
92
                    <dd>Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types</dd>
93
                    [% END %]
93
                [% END %]
94
                    [% IF ( CAN_user_parameters_manage_cities ) %]
94
                [% IF ( CAN_user_parameters_manage_cities ) %]
95
                        <dt><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></dt>
95
                    <dt><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></dt>
96
                        <dd>Define cities and towns that your patrons live in.</dd>
96
                    <dd>Define cities and towns that your patrons live in.</dd>
97
                    [% END %]
97
                [% END %]
98
                </dl>
98
                </dl>
99
            [% END %]
99
            [% END %]
100
100
101
            [% IF ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_manage_cash_registers ) %]
101
            [% IF ( CAN_user_parameters_manage_accounts || ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_manage_cash_registers ) ) %]
102
                <h3>Accounting</h3>
102
                <h3>Accounting</h3>
103
                <dl>
103
                <dl>
104
                    [% IF ( CAN_user_cash_management_manage_cash_registers ) %]
104
                [% IF ( CAN_user_parameters_manage_accounts ) %]
105
                        <dt><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></dt>
105
                    <dt><a href="/cgi-bin/koha/admin/debit_types.pl">Debit types</a></dt>
106
                        <dd>Define cash registers</dd>
106
                    <dd>Define debit types.</dd>
107
                    [% END %]
107
                [% END %]
108
                [% IF ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_manage_cash_registers ) %]
109
                    <dt><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></dt>
110
                    <dd>Define cash registers</dd>
111
                [% END %]
108
                </dl>
112
                </dl>
109
            [% END %]
113
            [% END %]
110
114
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt (-1 / +236 lines)
Line 0 Link Here
0
- 
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE Branches %]
4
[% USE Price %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Administration &rsaquo;
8
    [% IF op =='add_form' %]
9
        Account types &rsaquo;
10
       [% IF debit_type.code %]
11
           Modify account [% type %] type
12
       [% ELSE %]
13
           New account [% type %] type
14
       [% END %]
15
    [% ELSE %]
16
        [% IF op == 'delete_confirm' %]
17
            Account types &rsaquo; Confirm deletion of account [% type %] type
18
        [% ELSE %]
19
            Account types
20
        [% END %]
21
    [% END %]
22
</title>
23
[% INCLUDE 'doc-head-close.inc' %]
24
</head>
25
26
<body id="admin_debit_types" class="admin">
27
[% INCLUDE 'header.inc' %]
28
[% INCLUDE 'prefs-admin-search.inc' %]
29
30
<div id="breadcrumbs">
31
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
32
&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
33
&rsaquo; <a href="/cgi-bin/koha/admin/debit_types.pl">Account types</a>
34
[% IF op == 'add_form' %]
35
&rsaquo; [% IF debit_type.code %]Modify[% ELSE %]New[% END %] Account [% type %] type
36
[% ELSIF op == 'delete_confirm' %]
37
&rsaquo; Confirm deletion of account [% type %] type
38
[% END %]
39
</div>
40
41
<div class="main container-fluid">
42
    <div class="row">
43
        <div class="col-sm-10 col-sm-push-2">
44
            <main>
45
46
                [% FOREACH m IN messages %]
47
                <div class="dialog [% m.type %]">
48
                    [% SWITCH m.code %]
49
                    [% CASE 'error_on_saving' %]
50
                        An error occurred when saving this account type.
51
                    [% CASE 'error_on_delete' %]
52
                        An error occurred when deleting this account type. Check the logs.
53
                    [% CASE 'success_on_saving' %]
54
                        Account type saved successfully.
55
                    [% CASE 'success_on_delete' %]
56
                        Account type deleted successfully.
57
                    [% CASE %]
58
                        [% m.code %]
59
                    [% END %]
60
                </div>
61
                [% END %]
62
63
                [% IF op == 'add_form' %]
64
                    [% IF debit_type %]
65
                        <h3>Modify an account [% type %] type</h3>
66
                    [% ELSE %]
67
                        <h3>New account [% type %] type</h3>
68
                    [% END %]
69
70
                    <form action="/cgi-bin/koha/admin/debit_types.pl" name="Aform" method="post" class="validated">
71
                        <input type="hidden" name="op" value="add_validate" />
72
                        <input type="hidden" name="type" value="[% type %]" />
73
                        <fieldset class="rows">
74
                            <ol>
75
                                <li>
76
                                    <label for="code" class="required">Account [% type | html %] type code: </label>
77
                                    [% IF debit_type %]
78
                                        <strong>[% debit_type.code | html %]</strong>
79
                                        <input type="hidden" name="code" value="[% code %]" />
80
                                    [% ELSE %]
81
                                    <input type="text" name="code" id="code" size="10" maxlength="5" class="required" required="required"><span class="required">Required. Maximum length is 16 letters</span>
82
                                    [% END %]
83
                                </li>
84
                                [% IF type == 'debit' %]
85
                                <li>
86
                                    <label for="default_amount">Default amount: </label>
87
                                    <input type="text" name="default_amount" id="default_amount" size="80" maxlength="100" value="[% debit_type.default_amount | html %]" />
88
                                </li>
89
                                [% END %]
90
                                <li>
91
                                    <label for="description" class="required">Description: </label>
92
                                    <input type="text" name="description" id="description" required="required" class="required" size="80" maxlength="100" value="[% debit_type.description | html %]" /> <span class="required">Required</span>
93
                                </li>
94
                                <li>
95
                                    <label for="can_be_added_manually">Can be added manually? </label>
96
                                    [% IF debit_type.can_be_added_manually %]
97
                                        <input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" checked="checked" value="1" />
98
                                    [% ELSE %]
99
                                        <input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" value="1" />
100
                                    [% END %]
101
                                </li>
102
                                <li>
103
                                    <label for="branches">Libraries limitation: </label>
104
                                    <select id="branches" name="branches" multiple size="10">
105
                                        <option value="">All libraries</option>
106
                                        [% FOREACH branch IN branches_loop %]
107
                                        [% IF ( branch.selected ) %]
108
                                        <option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option>
109
                                        [% ELSE %]
110
                                        <option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option>
111
                                        [% END %]
112
                                        [% END %]
113
                                    </select>
114
                                    <span>Select 'All libraries' if this debit type should be available at all libraries. Otherwise select libraries you want to associate debit type with.</span>
115
                                </li>
116
                            </ol>
117
                        </fieldset>
118
119
                        <fieldset class="action">
120
                            <button id="save_debit_type" class="btn btn-default"><i class="fa fa-save"></i> Save</button>
121
                            <a class="cancel btn-link" href="/cgi-bin/koha/admin/debit_types.pl"><i class="fa fa-times"></i> Cancel</a>
122
                        </fieldset>
123
                    </form>
124
                [% END %]
125
126
                [% IF op == 'delete_confirm' %]
127
                    <div class="dialog alert">
128
                        <h3>Delete account [% type | html %] type "[% debit_type.description | html %]?"</h3>
129
                        <table>
130
                            <tr><th>Account type code</th>
131
                                <td>[% debit_type.code | html %]</td>
132
                            </tr>
133
                            <tr><th>Account type description</th>
134
                                <td>[% debit_type.description | html %]</td>
135
                            </tr>
136
                        </table>
137
                        <form action="/cgi-bin/koha/admin/debit_types.pl" method="post">
138
                            <input type="hidden" name="op" value="delete_confirmed" />
139
                            <input type="hidden" name="code" value="[% debit_type.code | html %]" />
140
                            <input type="hidden" name="type" value="[% type | html %]" />
141
                            <button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
142
                        </form>
143
                        <form action="/cgi-bin/koha/admin/debit_types.pl" method="get">
144
                            <button type=submit" class="btn btn-default deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
145
                        </form>
146
                    </div>
147
                [% END %]
148
149
                [% IF op == 'list' %]
150
                    <div id="toolbar" class="btn-toolbar">
151
                        <a class="btn btn-default" id="newdebittype" href="/cgi-bin/koha/admin/debit_types.pl?op=add_form&type=debit"><i class="fa fa-plus"></i> New debit type</a>
152
                    </div>
153
154
                    <h3>Account debit types</h3>
155
                    [% IF debit_types.count %]
156
                        <table id="table_debit_types">
157
                            <thead>
158
                                <th>Account type code</th>
159
                                <th>Description</th>
160
                                <th>Default amount</th>
161
                                <th>Can be added manually</th>
162
                                <th>Library limitations</th>
163
                                <th>Actions</th>
164
                            </thead>
165
                            <tbody>
166
                                [% FOREACH debit_type IN debit_types %]
167
                                <tr>
168
                                    <td>[% debit_type.code | html %]</td>
169
                                    <td>[% debit_type.description | html %]</td>
170
                                    <td>[% debit_type.default_amount | $Price %]</td>
171
                                    <td>[% IF debit_type.can_be_added_manually %]Yes[% ELSE %]No[% END %]</td>
172
                                    <td>
173
                                        [% IF debit_type.library_limits.count > 0 %]
174
                                            [% library_limits_str = "" %]
175
                                            [% FOREACH library IN debit_type.library_limits %]
176
                                                [%- IF loop.first -%]
177
                                                [% library_limits_str = library.branchname _ " (" _ library.branchcode _ ")" %]
178
                                                [% ELSE %]
179
                                                [% library_limits_str = library_limits_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %]
180
                                                [% END %]
181
                                            [% END %]
182
                                            <span class="library_limitation" title="[% library_limits_str | html %]">
183
                                                [% IF debit_type.library_limits.count > 1 %]
184
                                                    [% debit_type.library_limits.count | html %] library limitations
185
                                                [% ELSE %]
186
                                                    [% debit_type.library_limits.count | html %] library limitation
187
                                                [% END %]
188
                                        [% ELSE %]
189
                                            No limitation
190
                                        [% END %]
191
                                    </td>
192
                                    <td class="actions">
193
                                        [% IF !debit_type.is_system %]
194
                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/debit_types.pl?op=add_form&amp;code=[% debit_type.code | uri %]&type=debit"><i class="fa fa-pencil"></i> Edit</a>
195
                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/debit_types.pl?op=delete_confirm&amp;code=[% debit_type.code | uri %]&type=debit"><i class="fa fa-trash"></i> Delete</a>
196
                                        [% END %]
197
                                    </td>
198
                                </tr>
199
                                [% END %]
200
                            </tbody>
201
                        </table>
202
                    [% ELSE %]
203
                        <div class="dialog message">
204
                            There are no account debit types defined. <a href="/cgi-bin/koha/admin/debit_types.pl?op=add_form&type=debit">Create new debit type</a>
205
                        </div>
206
                    [% END %]
207
                [% END %]
208
            </main>
209
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
210
211
        <div class="col-sm-2 col-sm-pull-10">
212
            <aside>
213
                [% INCLUDE 'admin-menu.inc' %]
214
            </aside>
215
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
216
    </div> <!-- /.row -->
217
218
[% MACRO jsinclude BLOCK %]
219
    [% Asset.js("js/admin-menu.js") | $raw %]
220
    [% INCLUDE 'datatables.inc' %]
221
222
    <script>
223
        $(document).ready(function() {
224
            $("#table_debit_types").dataTable($.extend(true, {}, dataTablesDefaults, {
225
                "aoColumnDefs": [
226
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
227
                ],
228
                "aaSorting": [[ 1, "asc" ]],
229
                "iDisplayLength": 10,
230
                "sPaginationType": "full_numbers"
231
            }));
232
        });
233
    </script>
234
[% END %]
235
236
[% INCLUDE 'intranet-bottom.inc' %]

Return to bug 23049