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 49-54 sub delete { Link Here
49
    return $self->SUPER::delete;
49
    return $self->SUPER::delete;
50
}
50
}
51
51
52
=head3 _library_limits
53
54
Configurable library limits
55
56
=cut
57
58
sub _library_limits {
59
    return {
60
        class   => "AccountDebitTypesBranch",
61
        id      => "debit_type_code",
62
        library => "branchcode",
63
    };
64
}
65
52
=head3 type
66
=head3 type
53
67
54
=cut
68
=cut
(-)a/Koha/Account/DebitTypes.pm (-1 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
use List::Util qw/any/;
21
use List::Util qw/any/;
22
22
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::Account::DebitType;
24
25
25
use base qw(Koha::Objects);
26
use base qw(Koha::Objects Koha::Objects::Limit::Library);
26
27
27
=head1 NAME
28
=head1 NAME
28
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 / +234 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
       Debit types &rsaquo;
10
       [% IF debit_type.code %]
11
           Modify debit type
12
       [% ELSE %]
13
           New debit type
14
       [% END %]
15
    [% ELSE %]
16
       [% IF op == 'delete_confirm' %]
17
           Debit types &rsaquo; Confirm deletion of debit type
18
       [% ELSE %]
19
           Debit 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">Debit types</a>
34
[% IF op == 'add_form' %]
35
&rsaquo; [% IF debit_type.code %]Modify[% ELSE %]New[% END %] debit type
36
[% ELSIF op == 'delete_confirm' %]
37
&rsaquo; Confirm deletion of debit 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 | html %]">
48
                    [% SWITCH m.code %]
49
                    [% CASE 'error_on_saving' %]
50
                        An error occurred when saving this debit type.
51
                    [% CASE 'error_on_delete' %]
52
                        An error occurred when deleting this debit type. Check the logs.
53
                    [% CASE 'success_on_saving' %]
54
                        Debit type saved successfully.
55
                    [% CASE 'success_on_delete' %]
56
                        Debit type deleted successfully.
57
                    [% CASE %]
58
                        [% m.code | html %]
59
                    [% END %]
60
                </div>
61
                [% END %]
62
63
                [% IF op == 'add_form' %]
64
                    [% IF debit_type %]
65
                        <h3>Modify a debit type</h3>
66
                    [% ELSE %]
67
                        <h3>New debit 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 | html %]" />
73
                        <fieldset class="rows">
74
                            <ol>
75
                                <li>
76
                                    <label for="code" class="required">Debit type code: </label>
77
                                    [% IF debit_type %]
78
                                        <strong>[% debit_type.code | html %]</strong>
79
                                        <input type="hidden" name="code" value="[% code | html %]" />
80
                                    [% ELSE %]
81
                                    <input type="text" name="code" id="code" size="80" maxlength="64" class="required" required="required"><span class="required">Required. Maximum length is 64 letters</span>
82
                                    [% END %]
83
                                </li>
84
                                <li>
85
                                    <label for="default_amount">Default amount: </label>
86
                                    <input type="text" pattern="^\d+(\.\d{2})?$" name="default_amount" id="default_amount" size="80" maxlength="100" value="[% debit_type.default_amount | $Price on_editing => 1 %]" step="any" min="0"/>
87
                                </li>
88
                                <li>
89
                                    <label for="description" class="required">Description: </label>
90
                                    <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>
91
                                </li>
92
                                <li>
93
                                    <label for="can_be_added_manually">Can be added manually? </label>
94
                                    [% IF debit_type.can_be_added_manually %]
95
                                        <input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" checked="checked" value="1" />
96
                                    [% ELSE %]
97
                                        <input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" value="1" />
98
                                    [% END %]
99
                                </li>
100
                                <li>
101
                                    <label for="branches">Libraries limitation: </label>
102
                                    <select id="branches" name="branches" multiple size="10">
103
                                        <option value="">All libraries</option>
104
                                        [% FOREACH branch IN branches_loop %]
105
                                        [% IF ( branch.selected ) %]
106
                                        <option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option>
107
                                        [% ELSE %]
108
                                        <option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option>
109
                                        [% END %]
110
                                        [% END %]
111
                                    </select>
112
                                    <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>
113
                                </li>
114
                            </ol>
115
                        </fieldset>
116
117
                        <fieldset class="action">
118
                            <button id="save_debit_type" class="btn btn-default"><i class="fa fa-save"></i> Save</button>
119
                            <a class="cancel btn-link" href="/cgi-bin/koha/admin/debit_types.pl"><i class="fa fa-times"></i> Cancel</a>
120
                        </fieldset>
121
                    </form>
122
                [% END %]
123
124
                [% IF op == 'delete_confirm' %]
125
                    <div class="dialog alert">
126
                        <h3>Delete debit type "[% debit_type.description | html %]?"</h3>
127
                        <table>
128
                            <tr><th>Debit type code</th>
129
                                <td>[% debit_type.code | html %]</td>
130
                            </tr>
131
                            <tr><th>Debit type description</th>
132
                                <td>[% debit_type.description | html %]</td>
133
                            </tr>
134
                        </table>
135
                        <form action="/cgi-bin/koha/admin/debit_types.pl" method="post">
136
                            <input type="hidden" name="op" value="delete_confirmed" />
137
                            <input type="hidden" name="code" value="[% debit_type.code | html %]" />
138
                            <input type="hidden" name="type" value="[% type | html %]" />
139
                            <button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
140
                        </form>
141
                        <form action="/cgi-bin/koha/admin/debit_types.pl" method="get">
142
                            <button type=submit" class="btn btn-default deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
143
                        </form>
144
                    </div>
145
                [% END %]
146
147
                [% IF op == 'list' %]
148
                    <div id="toolbar" class="btn-toolbar">
149
                        <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>
150
                    </div>
151
152
                    <h3>Account debit types</h3>
153
                    [% IF debit_types.count %]
154
                        <table id="table_debit_types">
155
                            <thead>
156
                                <th>Code</th>
157
                                <th>Description</th>
158
                                <th>Default amount</th>
159
                                <th>Can be added manually</th>
160
                                <th>Library limitations</th>
161
                                <th>Actions</th>
162
                            </thead>
163
                            <tbody>
164
                                [% FOREACH debit_type IN debit_types %]
165
                                <tr>
166
                                    <td>[% debit_type.code | html %]</td>
167
                                    <td>[% debit_type.description | html %]</td>
168
                                    <td>[% debit_type.default_amount | $Price %]</td>
169
                                    <td>[% IF debit_type.can_be_added_manually %]Yes[% ELSE %]No[% END %]</td>
170
                                    <td>
171
                                        [% IF debit_type.library_limits.count > 0 %]
172
                                            [% library_limits_str = "" %]
173
                                            [% FOREACH library IN debit_type.library_limits %]
174
                                                [%- IF loop.first -%]
175
                                                [% library_limits_str = library.branchname _ " (" _ library.branchcode _ ")" %]
176
                                                [% ELSE %]
177
                                                [% library_limits_str = library_limits_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %]
178
                                                [% END %]
179
                                            [% END %]
180
                                            <span class="library_limitation" title="[% library_limits_str | html %]">
181
                                                [% IF debit_type.library_limits.count > 1 %]
182
                                                    [% debit_type.library_limits.count | html %] library limitations
183
                                                [% ELSE %]
184
                                                    [% debit_type.library_limits.count | html %] library limitation
185
                                                [% END %]
186
                                        [% ELSE %]
187
                                            No limitation
188
                                        [% END %]
189
                                    </td>
190
                                    <td class="actions">
191
                                        [% IF !debit_type.is_system %]
192
                                        <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>
193
                                        <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>
194
                                        [% END %]
195
                                    </td>
196
                                </tr>
197
                                [% END %]
198
                            </tbody>
199
                        </table>
200
                    [% ELSE %]
201
                        <div class="dialog message">
202
                            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>
203
                        </div>
204
                    [% END %]
205
                [% END %]
206
            </main>
207
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
208
209
        <div class="col-sm-2 col-sm-pull-10">
210
            <aside>
211
                [% INCLUDE 'admin-menu.inc' %]
212
            </aside>
213
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
214
    </div> <!-- /.row -->
215
216
[% MACRO jsinclude BLOCK %]
217
    [% Asset.js("js/admin-menu.js") | $raw %]
218
    [% INCLUDE 'datatables.inc' %]
219
220
    <script>
221
        $(document).ready(function() {
222
            $("#table_debit_types").dataTable($.extend(true, {}, dataTablesDefaults, {
223
                "aoColumnDefs": [
224
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
225
                ],
226
                "aaSorting": [[ 1, "asc" ]],
227
                "iDisplayLength": 10,
228
                "sPaginationType": "full_numbers"
229
            }));
230
        });
231
    </script>
232
[% END %]
233
234
[% INCLUDE 'intranet-bottom.inc' %]

Return to bug 23049