https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20946
--- Comment #18 from Tomás Cohen Arazi <tomasco...@gmail.com> --- (In reply to Jonathan Druart from comment #17) > Quick code review: > > 1. I do not like "return ( $total, $lines );" > We are simplifying the call here, but maybe next ones will not need the > total, or the line. It seems that we are recreating wrong patterns from C4. Do you prefer a Koha::Account::OutstandingCredits objecT? or Koha::Account->oustanding_debits_total + outstanding_debit_lines ? > 2. > Koha::Account->new( { patron_id => $borrowernumber } )->outstanding_debits; > should be > $patron->account->outstanding_debits I agree. This is an easy fix, though. > 3. ->balance is used from several other places, do we need to update them as > well? Balance is another thing. Balance is a global value representing if the patron owes or has credit. The point of having debits and credits separate is replicating what other tools do (see any bank account balance, for example). So in many places where ->balance is used, it is done in a correct way! -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/