Bug 25417: Prevent negative debit amount on backdating returns
Koha::Account->add_credit is expecting a positive amount. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
parent
f0ecc011f0
commit
44f4267cfc
|
|
@ -2397,6 +2397,8 @@ sub _FixOverduesOnReturn {
|
|||
if ($exemptfine) {
|
||||
my $amountoutstanding = $accountline->amountoutstanding;
|
||||
|
||||
return if $amountoutstanding <= 0;
|
||||
|
||||
my $account = Koha::Account->new({patron_id => $borrowernumber});
|
||||
my $credit = $account->add_credit(
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue