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

(-)a/Koha/Account.pm (-4 / +4 lines)
Lines 131-141 sub pay { Link Here
131
    # Were not passed a specific line to pay, or the payment was for more
131
    # Were not passed a specific line to pay, or the payment was for more
132
    # than the what was owed on the given line. In that case pay down other
132
    # than the what was owed on the given line. In that case pay down other
133
    # lines with remaining balance.
133
    # lines with remaining balance.
134
    my @outstanding_fines;
134
    # We select all lines with both positive and negative amountoutstanding
135
    @outstanding_fines = Koha::Account::Lines->search(
135
    # this allows credits to be applied by the logic below and negative balances to be cleared
136
    my @outstanding_fines = Koha::Account::Lines->search(
136
        {
137
        {
137
            borrowernumber    => $self->{patron_id},
138
            borrowernumber    => $self->{patron_id},
138
            amountoutstanding => { '>' => 0 },
139
            amountoutstanding => { '<>' => 0 },
139
        }
140
        }
140
    ) if $balance_remaining > 0;
141
    ) if $balance_remaining > 0;
141
142
142
- 

Return to bug 18580