From 1a25f1094d2d34163108b07b7486905cfbaac76f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 15 Mar 2019 14:07:24 +0000 Subject: [PATCH] Bug 22511: Update void method to use status We added a 'status' field to 'accountlines' in bug 22512 to allow for more fined grained control over 'types' and 'states'. This patch updates the void method to utilise this new field so we may keep the original credit type for later auditing should it be required. Signed-off-by: Martin Renvoize Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- Koha/Account/Line.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index d2ac161e82..aba318317d 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -71,7 +71,11 @@ sub checkout { =head3 void -$payment_accountline->void(); + $payment_accountline->void(); + +Used to 'void' (or reverse) a payment/credit. It will role back any offsets +created by the application of this credit upon any debits and mark the credit +as 'void' by updating it's status to "VOID". =cut @@ -133,7 +137,7 @@ sub void { $self->set( { - accounttype => 'VOID', + status => 'VOID', amountoutstanding => 0, amount => 0, } -- 2.39.5