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

(-)a/C4/SIP/ILS/Patron.pm (-9 / +10 lines)
Lines 61-66 sub new { Link Here
61
    $dexpiry and $dexpiry =~ s/-//g;    # YYYYMMDD
61
    $dexpiry and $dexpiry =~ s/-//g;    # YYYYMMDD
62
    my $fines_amount = $flags->{CHARGES}->{amount};
62
    my $fines_amount = $flags->{CHARGES}->{amount};
63
    $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0;
63
    $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0;
64
    my $fee_limit = _fee_limit();
65
    my $fine_blocked = $fines_amount > $fee_limit;
64
    {
66
    {
65
    no warnings;    # any of these $kp->{fields} being concat'd could be undef
67
    no warnings;    # any of these $kp->{fields} being concat'd could be undef
66
    %ilspatron = (
68
    %ilspatron = (
Lines 79-88 sub new { Link Here
79
        address         => $adr,
81
        address         => $adr,
80
        home_phone      => $kp->{phone},
82
        home_phone      => $kp->{phone},
81
        email_addr      => $kp->{email},
83
        email_addr      => $kp->{email},
82
        charge_ok       => ( !$debarred && !$expired ),
84
        charge_ok       => ( !$debarred && !$expired && !$fine_blocked),
83
        renew_ok        => ( !$debarred && !$expired ),
85
        renew_ok        => ( !$debarred && !$expired && !$fine_blocked),
84
        recall_ok       => ( !$debarred && !$expired ),
86
        recall_ok       => ( !$debarred && !$expired && !$fine_blocked),
85
        hold_ok         => ( !$debarred && !$expired ),
87
        hold_ok         => ( !$debarred && !$expired && !$fine_blocked),
86
        card_lost       => ( $kp->{lost} || $kp->{gonenoaddress} || $flags->{LOST} ),
88
        card_lost       => ( $kp->{lost} || $kp->{gonenoaddress} || $flags->{LOST} ),
87
        claims_returned => 0,
89
        claims_returned => 0,
88
        fines           => $fines_amount, # GetMemberAccountRecords($kp->{borrowernumber})
90
        fines           => $fines_amount, # GetMemberAccountRecords($kp->{borrowernumber})
Lines 99-104 sub new { Link Here
99
        unavail_holds   => [],
101
        unavail_holds   => [],
100
        inet            => ( !$debarred && !$expired ),
102
        inet            => ( !$debarred && !$expired ),
101
        expired         => $expired,
103
        expired         => $expired,
104
        fee_limit       => $fee_limit,
102
    );
105
    );
103
    }
106
    }
104
    $debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}";
107
    $debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}";
Lines 146-152 my %fields = ( Link Here
146
    card_lost               => 0,   # for patron_status[4]
149
    card_lost               => 0,   # for patron_status[4]
147
    recall_overdue          => 0,
150
    recall_overdue          => 0,
148
    currency                => 1,
151
    currency                => 1,
149
#   fee_limit               => 0,
152
    fee_limit               => 0,
150
    screen_msg              => 1,
153
    screen_msg              => 1,
151
    print_line              => 1,
154
    print_line              => 1,
152
    too_many_charged        => 0,   # for patron_status[5]
155
    too_many_charged        => 0,   # for patron_status[5]
Lines 331-339 sub inet_privileges { Link Here
331
    return $self->{inet} ? 'Y' : 'N';
334
    return $self->{inet} ? 'Y' : 'N';
332
}
335
}
333
336
334
sub fee_limit {
337
sub _fee_limit {
335
    my $self = shift;
338
    return C4::Context->preference('noissuescharge') || 5;
336
    return C4::Context->preference("noissuescharge") || 5;
337
}
339
}
338
340
339
sub excessive_fees {
341
sub excessive_fees {
340
- 

Return to bug 11633