]> git.koha-community.org Git - koha.git/commit
Bug 22435: (follow-up) Set CREATE offset for credits to positive
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 5 Jul 2021 13:16:30 +0000 (14:16 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Aug 2021 12:06:43 +0000 (14:06 +0200)
commit2ba701089931f7e67f1f8de363d125477fef2820
treeda8948da1e02b3f48d71ca21bf20af156c183fed
parent36140f37e59f50ac407cbb0c5e8f2dd557c18d4f
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.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Account.pm
installer/data/mysql/atomicupdate/bug_22435.perl
t/db_dependent/Accounts.t
t/db_dependent/Koha/Account.t