Bugzilla – Attachment 82747 Details for
Bug 21909
Koha::Account::outstanding_* methods should preserve call context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21909: Make Koha::Account::outstanding_* preserve context
Bug-21909-Make-KohaAccountoutstanding-preserve-con.patch (text/plain), 1.50 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-11-29 15:16:16 UTC
(
hide
)
Description:
Bug 21909: Make Koha::Account::outstanding_* preserve context
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-11-29 15:16:16 UTC
Size:
1.50 KB
patch
obsolete
>From 9f5c4c8f545386eb08b889b1a4e7e30e5bfbb88c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 29 Nov 2018 12:10:21 -0300 >Subject: [PATCH] Bug 21909: Make Koha::Account::outstanding_* preserve context > >This patch modifies the methods so they preserve the caller's context >(list and scalar). > >To test: >- Apply the first patch >- Run: > $ kshell > k$ prove t/db_dependent/Koha/Account.t >=> FAIL: outstanding_credits and outstanding_debits tests fail >- Apply this patch >- Run: > k$ prove t/db_dependent/Koha/Account.t >=> SUCCESS: We are so happy now :-D >- Sign off :-D >--- > Koha/Account.pm | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 5630f4130e..15e3b8ed32 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -428,13 +428,11 @@ my $lines = Koha::Account->new({ patron_id => $patron_id })->outstanding_debits; > sub outstanding_debits { > my ($self) = @_; > >- my $lines = $self->lines->search( >+ return $self->lines->search( > { > amountoutstanding => { '>' => 0 } > } > ); >- >- return $lines; > } > > =head3 outstanding_credits >@@ -446,13 +444,11 @@ my $lines = Koha::Account->new({ patron_id => $patron_id })->outstanding_credits > sub outstanding_credits { > my ($self) = @_; > >- my $lines = $self->lines->search( >+ return $self->lines->search( > { > amountoutstanding => { '<' => 0 } > } > ); >- >- return $lines; > } > > =head3 non_issues_charges >-- >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 21909
:
82746
|
82747
|
82748
|
82751
|
82752
|
82753
|
82799
|
82800
|
82801
|
83511
|
83512
|
83513