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

(-)a/Koha/Patron/Debarments.pm (-2 / +2 lines)
Lines 184-190 my $success = AddUniqueDebarment({ Link Here
184
184
185
Creates a new debarment of the type defined by the key type.
185
Creates a new debarment of the type defined by the key type.
186
If a unique debarment already exists of the given type, it is updated instead.
186
If a unique debarment already exists of the given type, it is updated instead.
187
The current unique debarment types are OVERDUES, and SUSPENSION
187
The current unique debarment types are OVERDUES, SUSPENSION, and FINES
188
188
189
Required keys: borrowernumber, type
189
Required keys: borrowernumber, type
190
190
Lines 232-238 my $success = _DelUniqueDebarment({ Link Here
232
});
232
});
233
233
234
Deletes a unique debarment of the type defined by the key type.
234
Deletes a unique debarment of the type defined by the key type.
235
The current unique debarment types are OVERDUES, and SUSPENSION
235
The current unique debarment types are OVERDUES, SUSPENSION, and FINES
236
236
237
Required keys: borrowernumber, type
237
Required keys: borrowernumber, type
238
238
(-)a/installer/data/mysql/atomicupdate/bug_39532.pl (+21 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_success);
3
4
return {
5
    bug_number  => "39532",
6
    description => "Add FINES restriction type for debar_patrons_with_fines.pl script",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        # Add the new FINES restriction type
12
        $dbh->do(
13
            q{
14
            INSERT IGNORE INTO restriction_types (code, display_text, is_system, is_default)
15
            VALUES ('FINES', 'Fines suspension', 1, 0)
16
        }
17
        );
18
19
        say_success( $out, "Added new system restriction type 'FINES'" );
20
    },
21
};
(-)a/installer/data/mysql/en/mandatory/patron_restriction_types.yml (+5 lines)
Lines 49-51 tables: Link Here
49
          display_text: "Notice failure suspension"
49
          display_text: "Notice failure suspension"
50
          is_system: 1
50
          is_system: 1
51
          is_default: 0
51
          is_default: 0
52
53
        - code: "FINES"
54
          display_text: "Fines suspension"
55
          is_system: 1
56
          is_default: 0
(-)a/misc/cronjobs/debar_patrons_with_fines.pl (-2 / +1 lines)
Lines 110-116 while ( my $patron = $patrons->next ) { Link Here
110
            {
110
            {
111
                borrowernumber => $patron->id,
111
                borrowernumber => $patron->id,
112
                expiration     => $expiration,
112
                expiration     => $expiration,
113
                type           => 'SUSPENSION',
113
                type           => 'FINES',
114
                comment        => $message,
114
                comment        => $message,
115
            }
115
            }
116
        );
116
        );
117
- 

Return to bug 39532