Bugzilla – Attachment 127461 Details for
Bug 28994
Make writeoff_debts.pl use amountoutstanding, not amount
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28994: Fix logical errors with amount vs amoutoutstanding
Bug-28994-Fix-logical-errors-with-amount-vs-amouto.patch (text/plain), 1.88 KB, created by
Martin Renvoize (ashimema)
on 2021-11-09 10:15:01 UTC
(
hide
)
Description:
Bug 28994: Fix logical errors with amount vs amoutoutstanding
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-09 10:15:01 UTC
Size:
1.88 KB
patch
obsolete
>From d3caee160946340edb36e7692b5c6c07f87f08c8 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 9 Nov 2021 10:13:05 +0000 >Subject: [PATCH] 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. >--- > misc/cronjobs/writeoff_debts.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/cronjobs/writeoff_debts.pl b/misc/cronjobs/writeoff_debts.pl >index 1f1a9e8b2f..64e196b388 100755 >--- a/misc/cronjobs/writeoff_debts.pl >+++ b/misc/cronjobs/writeoff_debts.pl >@@ -72,10 +72,10 @@ while ( my $line = $lines->next ) { > my $writeoff = Koha::Account::Line->new( > { > date => \'NOW()', >- amount => 0 - $line->amount, >+ amount => 0 - $line->amountoutstanding, > credit_type_code => 'WRITEOFF', > status => 'ADDED', >- amountoutstanding => 0 - $line->amount, >+ amountoutstanding => 0 - $line->amountoutstanding, > manager_id => undef, > borrowernumber => $line->borrowernumber, > interface => 'intranet', >@@ -87,7 +87,7 @@ while ( my $line = $lines->next ) { > { > credit_id => $writeoff->accountlines_id, > type => 'WRITEOFF', >- amount => $line->amount >+ amount => $line->amountoutstanding > } > )->store(); > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28994
:
127461
|
127462