https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19382
--- Comment #24 from Kyle M Hall <[email protected]> --- (In reply to Jonathan Druart from comment #23) > Yes indeed. > My idea was to make the tests more readable, and this: > > + $amount = 0 if ( $patron->id == $child_2->id && ( $i == 0 || $i > == 2 || $i == 4 || $i == 5 || $i == 6 ) ); > > is something I'd like to avoid :) Yes, I agree what I wrote there is just awful ;) > What about the previous question? > (In reply to Jonathan Druart from comment #18) > > > + is( $child_1->relationships_debt({ only_this_guarantor => 1, > > > include_guarantors => 0, include_this_patron => 0 }), 0, 'Family debt is > > > correct' ); > > > > Is this correct? $child_1 is not a guarantor so I don't think it should > > follow "only_this_guarantor". I would have expected 10 here, can you > > confirm? In this case, since the patron is not a guarantor, we have no guarantors to get debt from, we are also saying don't include this patron. Basically with this combination for a guarantee, the result will always 0. I think this makes more sense than simply ignoring only_this_guarantor if the patron is not a guarantor. As it is written it follows a consistent internal logic. -- 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/
