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.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-03-16 17:18:39 +00:00 committed by Jonathan Druart
parent 47c16a8ac0
commit dfd3f183cf
1 changed files with 4 additions and 4 deletions

View File

@ -283,7 +283,7 @@ sub void {
Koha::Account::Offset->new(
{
debit_id => $void->id,
type => 'VOID',
type => 'CREATE',
amount => $self->amount * -1
}
)->store();
@ -415,7 +415,7 @@ sub cancel {
my $cancellation_offset = Koha::Account::Offset->new(
{
credit_id => $cancellation->accountlines_id,
type => 'CANCELLATION',
type => 'CREATE',
amount => $self->amount
}
)->store();
@ -539,7 +539,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();