Bug 18790: Add logging for voided payments

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Kyle M Hall 2018-02-21 07:03:17 -05:00 committed by Jonathan Druart
parent 5372faf4e5
commit 49a0ed8d16
1 changed files with 19 additions and 0 deletions

View File

@ -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',