Bugzilla – Attachment 83012 Details for
Bug 21969
Koha::Account->outstanding_* should look for debits/credits by checking 'amount'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21969: Fix Koha::Account->outstanding_* matching the opposite on pathological cases
Bug-21969-Fix-KohaAccount-outstanding-matching-the.patch (text/plain), 1.31 KB, created by
Martin Renvoize (ashimema)
on 2018-12-10 12:15:58 UTC
(
hide
)
Description:
Bug 21969: Fix Koha::Account->outstanding_* matching the opposite on pathological cases
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-12-10 12:15:58 UTC
Size:
1.31 KB
patch
obsolete
>From b3fbf1f09b856bfecb4b01aeeaa4ccc688fc2b18 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 6 Dec 2018 15:59:10 -0300 >Subject: [PATCH] Bug 21969: Fix Koha::Account->outstanding_* matching the > opposite on pathological cases > >This patch makes outstanding_* methods be safe regarding pathological >account lines that get converted into another type because of the value >of amountoutstanding > >To test: >- Run: > $ kshell > k$ prove t/db_dependent/Koha/Account.t >=> FAIL: Tests fail because pathological account lines are wrongly >picked. >- Apply this patch >- Run: > k$ prove t/db_dependent/Koha/Account.t >=>SUCCESS: All green! > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Account.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 5630f4130e..4b68f2aaa9 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -430,6 +430,7 @@ sub outstanding_debits { > > my $lines = $self->lines->search( > { >+ amount => { '>' => 0 }, > amountoutstanding => { '>' => 0 } > } > ); >@@ -448,6 +449,7 @@ sub outstanding_credits { > > my $lines = $self->lines->search( > { >+ amount => { '<' => 0 }, > amountoutstanding => { '<' => 0 } > } > ); >-- >2.19.2
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 21969
:
82939
|
82940
|
83011
|
83012
|
83047
|
83048