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
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
sub outstanding_debits {
my ($self) = @_;
- my $lines = $self->lines->search(
+ return $self->lines->search(
{
amount => { '>' => 0 },
amountoutstanding => { '>' => 0 }
}
);
-
- return $lines;
}
=head3 outstanding_credits
sub outstanding_credits {
my ($self) = @_;
- my $lines = $self->lines->search(
+ return $self->lines->search(
{
amount => { '<' => 0 },
amountoutstanding => { '<' => 0 }
}
);
-
- return $lines;
}
=head3 non_issues_charges