Bug 28994: Fix logical errors with amount vs amoutoutstanding
authorMagnus Enger <magnus@libriotech.no>
Tue, 9 Nov 2021 10:13:05 +0000 (10:13 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 19 Nov 2021 15:47:59 +0000 (10:47 -0500)
commitd316a33de921f445049e879f05b166f3862272a2
treeb105a978d59ce8dde23091561767b872c69dc621
parent0cde39f9b8b24f0567c06ddf814169198032977a
Bug 28994: Fix logical errors with amount vs amoutoutstanding

The writeoff debts script contained an error whereby we could writeoff
more than the current outstanding debt of a charge.  This patch corrects
that mistake by passing amountoutstanding in place of amount in the
writeoff and offset creation lines.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/cronjobs/writeoff_debts.pl