[Koha-bugs] [Bug 29757] Add filter_by_non_reversible/reversible methods for offsets

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 11 15:02:29 CET 2022


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|BLOCKED                     |Passed QA

--- Comment #14 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
What I still have trouble with here most, is that the two filter methods have a
generic name but they relate to debits.

We could use:
my $total_reversible = $debit->debit_offsets->filter_by_reversible->total;

But what if we want to filter credits?
my $total_reversible = $credit->credit_offsets->filter_by_reversible->total;
That would make no sense; the code refers to credit_id and amount < 0.

So, in other words, does the name really reflect what we are doing?

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


More information about the Koha-bugs mailing list