From 558c339412e0c826fb5ae68b4252a84749c6383c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 21 Feb 2018 07:03:17 -0500 Subject: [PATCH] Bug 18790: Add logging for voided payments --- Koha/Account/Line.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index c060b31..6e4648e 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::Account::Offsets; @@ -69,6 +72,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', -- 2.10.2