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

(-)a/circ/circulation.pl (+2 lines)
Lines 46-51 use Koha::AuthorisedValues; Link Here
46
use Koha::CsvProfiles;
46
use Koha::CsvProfiles;
47
use Koha::Patrons;
47
use Koha::Patrons;
48
use Koha::Patron::Debarments qw( GetDebarments );
48
use Koha::Patron::Debarments qw( GetDebarments );
49
use Koha::RestrictionTypes;
49
use Koha::DateUtils qw( dt_from_string output_pref );
50
use Koha::DateUtils qw( dt_from_string output_pref );
50
use Koha::Plugins;
51
use Koha::Plugins;
51
use Koha::Database;
52
use Koha::Database;
Lines 630-635 $template->param( Link Here
630
    SpecifyDueDate            => $duedatespec_allow,
631
    SpecifyDueDate            => $duedatespec_allow,
631
    PatronAutoComplete      => C4::Context->preference("PatronAutoComplete"),
632
    PatronAutoComplete      => C4::Context->preference("PatronAutoComplete"),
632
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
633
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
634
    restriction_types         => scalar Koha::RestrictionTypes->keyed_on_code(),
633
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
635
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
634
    has_modifications         => $has_modifications,
636
    has_modifications         => $has_modifications,
635
    override_high_holds       => $override_high_holds,
637
    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 1331-1338 legend:hover { Link Here
1331
                                                </thead>
1331
                                                </thead>
1332
                                                <tbody>
1332
                                                <tbody>
1333
                                                    [% FOREACH d IN debarments %]
1333
                                                    [% FOREACH d IN debarments %]
1334
                                                        [% dtype = d.type %]
1334
                                                        <tr>
1335
                                                        <tr>
1335
                                                            <td>[% d.type | html %]</td>
1336
                                                            <td>[% restriction_types.$dtype.display_text | html %]</td>
1336
                                                            <td>
1337
                                                            <td>
1337
                                                                [% IF d.comment.search('OVERDUES_PROCESS') %]
1338
                                                                [% IF d.comment.search('OVERDUES_PROCESS') %]
1338
                                                                    Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1339
                                                                    Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
(-)a/members/memberentry.pl (-1 / +4 lines)
Lines 36-41 use Koha::AuthUtils; Link Here
36
use Koha::AuthorisedValues;
36
use Koha::AuthorisedValues;
37
use Koha::Email;
37
use Koha::Email;
38
use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
38
use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
39
use Koha::RestrictionTypes;
39
use Koha::Cities;
40
use Koha::Cities;
40
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::Libraries;
42
use Koha::Libraries;
Lines 116-122 foreach my $id ( @delete_guarantor ) { Link Here
116
117
117
## Deal with debarments
118
## Deal with debarments
118
$template->param(
119
$template->param(
119
    debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ) );
120
    debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ),
121
    restriction_types => scalar Koha::RestrictionTypes->keyed_on_code()
122
);
120
my @debarments_to_remove = $input->multi_param('remove_debarment');
123
my @debarments_to_remove = $input->multi_param('remove_debarment');
121
foreach my $d ( @debarments_to_remove ) {
124
foreach my $d ( @debarments_to_remove ) {
122
    DelDebarment( $d );
125
    DelDebarment( $d );
(-)a/members/moremember.pl (-1 / +5 lines)
Lines 37-42 use List::MoreUtils qw( uniq ); Link Here
37
use Scalar::Util qw( looks_like_number );
37
use Scalar::Util qw( looks_like_number );
38
use Koha::Patron::Attribute::Types;
38
use Koha::Patron::Attribute::Types;
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::CsvProfiles;
42
use Koha::CsvProfiles;
42
use Koha::Holds;
43
use Koha::Holds;
Lines 79-84 for (qw(gonenoaddress lost borrowernotes is_debarred)) { Link Here
79
    $patron->$_ and $template->param(flagged => 1) and last;
80
    $patron->$_ and $template->param(flagged => 1) and last;
80
}
81
}
81
82
83
$template->param(
84
    restriction_types => scalar Koha::RestrictionTypes->keyed_on_code()
85
}
86
82
if ( $patron->is_debarred ) {
87
if ( $patron->is_debarred ) {
83
    $template->param(
88
    $template->param(
84
        'debarments'      => scalar GetDebarments({ borrowernumber => $borrowernumber }),
89
        'debarments'      => scalar GetDebarments({ borrowernumber => $borrowernumber }),
85
- 

Return to bug 23681