[Koha-bugs] [Bug 19382] Add ability to block guarantees based on fees owed by guarantor and other guarantees

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 31 17:32:41 CEST 2020


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

--- Comment #24 from Kyle M Hall <kyle at bywatersolutions.com> ---
(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.


More information about the Koha-bugs mailing list