diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index 83b635996c..e2cb749f67 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -18,6 +18,9 @@ package Koha::Account::Line; use Modern::Perl; use Carp; +use Data::Dumper; + +use C4::Log qw(logaction); use Koha::Database; use Koha::Items; @@ -82,6 +85,22 @@ sub void { )->store(); } + if ( C4::Context->preference("FinesLog") ) { + logaction("FINES", 'VOID', $self->borrowernumber, Dumper({ + action => 'void_payment', + borrowernumber => $self->borrowernumber,, + amount => $self->amount, + amountoutstanding => $self->amountoutstanding, + description => $self->description, + accounttype => $self->accounttype, + payment_type => $self->payment_type, + note => $self->note, + itemnumber => $self->itemnumber, + manager_id => $self->manager_id, + offsets => [ map { $_->unblessed } @account_offsets ], + })); + } + $self->set( { accounttype => 'VOID',