borrowernumber => $self->{patron_id},
accountno => $accountno,
}
- );
+ ) if grep { $type eq $_ } ('payment', 'writeoff') ;
if ( C4::Context->preference("FinesLog") ) {
logaction(
return $lines;
}
+=head3 outstanding_credits
+
+my $lines = Koha::Account->new({ patron_id => $patron_id })->outstanding_credits;
+
+=cut
+
+sub outstanding_credits {
+ my ($self) = @_;
+
+ my $lines = Koha::Account::Lines->search(
+ {
+ borrowernumber => $self->{patron_id},
+ amountoutstanding => { '<' => 0 }
+ }
+ );
+
+ return $lines;
+}
+
=head3 non_issues_charges
my $non_issues_charges = $self->non_issues_charges
=cut
our $offset_type = {
- 'credit' => 'Payment',
+ 'credit' => 'Manual Credit',
'forgiven' => 'Writeoff',
'lost_item_return' => 'Lost Item Return',
'payment' => 'Payment',