[Koha-bugs] [Bug 17586] Add the Koha::Account::Lines->get_balance method

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 5 16:57:04 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17586

--- Comment #10 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #9)
> (In reply to Kyle M Hall from comment #8)
> > I don't want to be *too* much of a pedant, but wouldn't this method be
> > better in Koha::Account? I see there are a good number of patches that
> > depend on this, so if that change will require many further changes, I'd be
> > happy with just a final bug at the end of the chain to move it to
> > Koha::Account.
> 
> How would you write this line in that case:
>   my $balance = $patron->get_account_lines->get_balance;
> (from the patch on bug 17588).
> 
> Maybe just $patron->get_account_balance then?

I would do $patron->account()->balance() with account() returning the
Koha::Account object, and balance() returning the account balance. Of course,
I'm a fan of being succinct ; )

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list