From c518be608daf4d3f4cc3804870e0635267fd4c3e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 16 Mar 2021 17:18:39 +0000 Subject: [PATCH] Bug 22435: Use 'CREATE' offset type in Koha::Account::Line This patch updates the Koha::Account::Line methods that result in new account lines to use the 'CREATE' offset type for the creation record. --- Koha/Account/Line.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index 9418267625..fe3e4109a0 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -284,7 +284,7 @@ sub void { Koha::Account::Offset->new( { debit_id => $void->id, - type => 'VOID', + type => 'CREATE', amount => $self->amount * -1 } )->store(); @@ -416,7 +416,7 @@ sub cancel { my $cancellation_offset = Koha::Account::Offset->new( { credit_id => $cancellation->accountlines_id, - type => 'CANCELLATION', + type => 'CREATE', amount => $self->amount } )->store(); @@ -540,7 +540,7 @@ sub reduce { my $reduction_offset = Koha::Account::Offset->new( { credit_id => $reduction->accountlines_id, - type => uc( $params->{reduction_type} ), + type => 'CREATE', amount => $params->{amount} } )->store(); @@ -772,7 +772,7 @@ sub payout { my $payout_offset = Koha::Account::Offset->new( { debit_id => $payout->accountlines_id, - type => 'PAYOUT', + type => 'CREATE', amount => $amount } )->store(); -- 2.20.1