From 449d50ef9b09bfc649fceec94f6212ca78c0d7a2 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 --- 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 f0c426e849..bef72c4b39 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.20.1