[Koha-bugs] [Bug 14577] Allow restriction of checkouts based on fines of guarantor/guarantee

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 16 19:11:19 CET 2016


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

--- Comment #12 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #9)

> - circ/circulation_batch_checkouts.tt will need to be modified too

Fixed!

> - The tests in Patron.t are not necessary. It's covered by
> t/db_dependent/Koha/Patrons.t

Fixed!

> ::: C4/Circulation.pm
> @@ +852,5 @@
> >      my $allfinesneedoverride = C4::Context->preference("AllFinesNeedOverride");
> > +
> > +    # Check the debt of this patrons guarantees
> > +    my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees");
> > +    $no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees );
> 
> Is there a difference with 'defined $a && $a > 0'?

It's a safety check in case some puts a non-number in the system preference (
since it's free text ).

> @@ +867,5 @@
> > +            $issuingimpossible{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges );
> > +        } elsif ( $guarantees_non_issues_charges > $no_issues_charge_guarantees && !$inprocess && $allowfineoverride) {
> > +            $needsconfirmation{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges );
> > +        } elsif ( $allfinesneedoverride && $guarantees_non_issues_charges > 0 && $guarantees_non_issues_charges <= $no_issues_charge_guarantees && !$inprocess ) {
> > +            $needsconfirmation{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges );
> 
> It would be better to use the Price TT plugin to display these values.

Fixed!

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


More information about the Koha-bugs mailing list