[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
Mon Mar 14 18:28:58 CET 2016


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

--- Comment #9 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 49036
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49036
Bug 14577 - Allow restriction of checkouts based on fines of guarantor's
guarantees

Review of attachment 49036:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14577&attachment=49036)
-----------------------------------------------------------------

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

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

::: 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'?

@@ +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.

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


More information about the Koha-bugs mailing list