From 72329b423e226d3430a58bc9c085f6dacda5f633 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 5 Jul 2021 14:16:30 +0100 Subject: [PATCH] Bug 22435: (follow-up) Set CREATE offset for credits to positive The history view of an accountline shows increases and decreases in the amount outstanding from the perspective of the credit/debit line you are inspecting. Apply creates a negative offset amount which acts to 'reduce' both the outstanding 'debt' for the debit line and the outstanding 'credit' for the credit line. Starting with a negative offset for the credit thus makes this nonsenical. Void creates positive offset amounts which act to 'restore' both the outstanding 'debt' for the debit line and the outstanding 'credit' for the credit line. --- Koha/Account.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index 48ad1266d1..5a22e83655 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -244,7 +244,7 @@ sub add_credit { { credit_id => $line->id, type => 'CREATE', - amount => $amount + amount => $amount * -1 } )->store(); -- 2.20.1