Bugzilla – Attachment 82940 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.25 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-12-06 19:05:34 UTC
(
hide
)
Description:
Bug 21969: Fix Koha::Account->outstanding_* matching the opposite on pathological cases
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-12-06 19:05:34 UTC
Size:
1.25 KB
patch
obsolete
>From 938eb3712dbfbc2faf1fa74abd452a7b00bea865 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! >--- > 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