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

(-)a/circ/circulation.pl (+2 lines)
Lines 47-52 use Koha::AuthorisedValues; Link Here
47
use Koha::CsvProfiles;
47
use Koha::CsvProfiles;
48
use Koha::Patrons;
48
use Koha::Patrons;
49
use Koha::Patron::Debarments qw(GetDebarments);
49
use Koha::Patron::Debarments qw(GetDebarments);
50
use Koha::RestrictionTypes;
50
use Koha::DateUtils;
51
use Koha::DateUtils;
51
use Koha::Database;
52
use Koha::Database;
52
use Koha::BiblioFrameworks;
53
use Koha::BiblioFrameworks;
Lines 632-637 $template->param( Link Here
632
    SpecifyDueDate            => $duedatespec_allow,
633
    SpecifyDueDate            => $duedatespec_allow,
633
    PatronAutoComplete      => C4::Context->preference("PatronAutoComplete"),
634
    PatronAutoComplete      => C4::Context->preference("PatronAutoComplete"),
634
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
635
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
636
    restriction_types         => scalar Koha::RestrictionTypes->keyed_on_code(),
635
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
637
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
636
    has_modifications         => $has_modifications,
638
    has_modifications         => $has_modifications,
637
    override_high_holds       => $override_high_holds,
639
    override_high_holds       => $override_high_holds,
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc (-10 / +2 lines)
Lines 17-34 Link Here
17
            </thead>
17
            </thead>
18
            <tbody>
18
            <tbody>
19
                [% FOREACH d IN debarments %]
19
                [% FOREACH d IN debarments %]
20
                    [% dtype = d.type %]
20
                    <tr>
21
                    <tr>
21
                        <td>
22
                        <td>
22
                            [% SWITCH d.type %]
23
                            [% restriction_types.$dtype.display_text | html %]
23
                                [% CASE 'MANUAL' %]
24
                                    Manual
25
                                [% CASE 'OVERDUES' %]
26
                                    Overdues
27
                                [% CASE 'SUSPENSION' %]
28
                                    Suspension
29
                                [% CASE 'DISCHARGE' %]
30
                                    Discharge
31
                            [% END %]
32
                        </td>
24
                        </td>
33
                        <td>
25
                        <td>
34
			    [% IF d.comment.search('OVERDUES_PROCESS') %]
26
			    [% IF d.comment.search('OVERDUES_PROCESS') %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-1 / +2 lines)
Lines 1159-1166 Link Here
1159
                                                </thead>
1159
                                                </thead>
1160
                                                <tbody>
1160
                                                <tbody>
1161
                                                    [% FOREACH d IN debarments %]
1161
                                                    [% FOREACH d IN debarments %]
1162
                                                        [% dtype = d.type %]
1162
                                                        <tr>
1163
                                                        <tr>
1163
                                                            <td>[% d.type | html %]</td>
1164
                                                            <td>[% restriction_types.$dtype.display_text | html %]</td>
1164
                                                            <td>
1165
                                                            <td>
1165
                                                                [% IF d.comment.search('OVERDUES_PROCESS') %]
1166
                                                                [% IF d.comment.search('OVERDUES_PROCESS') %]
1166
                                                                    Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1167
                                                                    Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
(-)a/members/memberentry.pl (-1 / +4 lines)
Lines 39-44 use C4::Form::MessagingPreferences; Link Here
39
use Koha::AuthUtils;
39
use Koha::AuthUtils;
40
use Koha::AuthorisedValues;
40
use Koha::AuthorisedValues;
41
use Koha::Patron::Debarments;
41
use Koha::Patron::Debarments;
42
use Koha::RestrictionTypes;
42
use Koha::Cities;
43
use Koha::Cities;
43
use Koha::DateUtils;
44
use Koha::DateUtils;
44
use Koha::Libraries;
45
use Koha::Libraries;
Lines 120-126 foreach my $id ( @delete_guarantor ) { Link Here
120
121
121
## Deal with debarments
122
## Deal with debarments
122
$template->param(
123
$template->param(
123
    debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ) );
124
    debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ),
125
    restriction_types => scalar Koha::RestrictionTypes->keyed_on_code()
126
);
124
my @debarments_to_remove = $input->multi_param('remove_debarment');
127
my @debarments_to_remove = $input->multi_param('remove_debarment');
125
foreach my $d ( @debarments_to_remove ) {
128
foreach my $d ( @debarments_to_remove ) {
126
    DelDebarment( $d );
129
    DelDebarment( $d );
(-)a/members/moremember.pl (-1 / +5 lines)
Lines 37-42 use C4::Form::MessagingPreferences; Link Here
37
use List::MoreUtils qw/uniq/;
37
use List::MoreUtils qw/uniq/;
38
use C4::Members::Attributes qw(GetBorrowerAttributes);
38
use C4::Members::Attributes qw(GetBorrowerAttributes);
39
use Koha::Patron::Debarments qw(GetDebarments);
39
use Koha::Patron::Debarments qw(GetDebarments);
40
use Koha::RestrictionTypes;
40
use Koha::Patron::Messages;
41
use Koha::Patron::Messages;
41
use Koha::DateUtils;
42
use Koha::DateUtils;
42
use Koha::CsvProfiles;
43
use Koha::CsvProfiles;
Lines 88-93 for (qw(gonenoaddress lost borrowernotes is_debarred)) { Link Here
88
    $patron->$_ and $template->param(flagged => 1) and last;
89
    $patron->$_ and $template->param(flagged => 1) and last;
89
}
90
}
90
91
92
$template->param(
93
    restriction_types => scalar Koha::RestrictionTypes->keyed_on_code()
94
}
95
91
if ( $patron->is_debarred ) {
96
if ( $patron->is_debarred ) {
92
    $template->param(
97
    $template->param(
93
        debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }),
98
        debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }),
94
- 

Return to bug 23681