Bug 22435: Fix CREATE offset amounts
Updateing the tests highlighted a mistake in the original code.. the offsets for the cancel and reduce creation lines were incorrectly signed. 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:
parent
9b34ca9fe2
commit
c188ec1567
|
|
@ -416,7 +416,7 @@ sub cancel {
|
|||
{
|
||||
credit_id => $cancellation->accountlines_id,
|
||||
type => 'CREATE',
|
||||
amount => $self->amount
|
||||
amount => 0 - $self->amount
|
||||
}
|
||||
)->store();
|
||||
|
||||
|
|
@ -535,7 +535,7 @@ sub reduce {
|
|||
{
|
||||
credit_id => $reduction->accountlines_id,
|
||||
type => 'CREATE',
|
||||
amount => $params->{amount}
|
||||
amount => 0 - $params->{amount}
|
||||
}
|
||||
)->store();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue