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

(-)a/circ/circulation.pl (+2 lines)
Lines 45-50 use Koha::AuthorisedValues; Link Here
45
use Koha::CsvProfiles;
45
use Koha::CsvProfiles;
46
use Koha::Patrons;
46
use Koha::Patrons;
47
use Koha::Patron::Debarments qw( GetDebarments );
47
use Koha::Patron::Debarments qw( GetDebarments );
48
use Koha::RestrictionTypes;
48
use Koha::DateUtils qw( dt_from_string output_pref );
49
use Koha::DateUtils qw( dt_from_string output_pref );
49
use Koha::Plugins;
50
use Koha::Plugins;
50
use Koha::Database;
51
use Koha::Database;
Lines 625-630 $template->param( Link Here
625
    SpecifyDueDate            => $duedatespec_allow,
626
    SpecifyDueDate            => $duedatespec_allow,
626
    PatronAutoComplete      => C4::Context->preference("PatronAutoComplete"),
627
    PatronAutoComplete      => C4::Context->preference("PatronAutoComplete"),
627
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
628
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
629
    restriction_types         => scalar Koha::RestrictionTypes->keyed_on_code(),
628
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
630
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
629
    has_modifications         => $has_modifications,
631
    has_modifications         => $has_modifications,
630
    override_high_holds       => $override_high_holds,
632
    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
                                    <span>Manual</span>
25
                                [% CASE 'OVERDUES' %]
26
                                    <span>Overdues</span>
27
                                [% CASE 'SUSPENSION' %]
28
                                    <span>Suspension</span>
29
                                [% CASE 'DISCHARGE' %]
30
                                    <span>Discharge</span>
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 1355-1362 legend:hover { Link Here
1355
                                                </thead>
1355
                                                </thead>
1356
                                                <tbody>
1356
                                                <tbody>
1357
                                                    [% FOREACH d IN debarments %]
1357
                                                    [% FOREACH d IN debarments %]
1358
                                                        [% dtype = d.type %]
1358
                                                        <tr>
1359
                                                        <tr>
1359
                                                            <td>[% d.type | html %]</td>
1360
                                                            <td>[% restriction_types.$dtype.display_text | html %]</td>
1360
                                                            <td>
1361
                                                            <td>
1361
                                                                [% IF d.comment.search('OVERDUES_PROCESS') %]
1362
                                                                [% IF d.comment.search('OVERDUES_PROCESS') %]
1362
                                                                    Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]
1363
                                                                    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 117-123 foreach my $id ( @delete_guarantor ) { Link Here
117
118
118
## Deal with debarments
119
## Deal with debarments
119
$template->param(
120
$template->param(
120
    debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ) );
121
    debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ),
122
    restriction_types => scalar Koha::RestrictionTypes->keyed_on_code()
123
);
121
my @debarments_to_remove = $input->multi_param('remove_debarment');
124
my @debarments_to_remove = $input->multi_param('remove_debarment');
122
foreach my $d ( @debarments_to_remove ) {
125
foreach my $d ( @debarments_to_remove ) {
123
    DelDebarment( $d );
126
    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