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

--- Comment #15 from Tomás Cohen Arazi <[email protected]> ---
(In reply to Marcel de Rooy from comment #14)
> 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?

I agree.

Martin and I have been talking about subclassing Koha::Acount::Line(s) so we
have proper classes for debits and credits. In that case, we could move those
methods there. I'm fine with a method name change. I ran out of ideas, though.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to