diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 5783038055..4d8c7acbc4 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -909,7 +909,6 @@ sub CanBookBeIssued { if ( $rentalConfirmation ){ my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'}, $borrower->{'borrowernumber'} ); if ( $rentalCharge > 0 ){ - $rentalCharge = sprintf("%.02f", $rentalCharge); $needsconfirmation{RENTALCHARGE} = $rentalCharge; } } @@ -3133,6 +3132,9 @@ sub GetIssuingCharges { my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type); $charge = ( $charge * ( 100 - $discount ) ) / 100; } + if ($charge) { + $charge = sprintf '%.2f', $charge; # ensure no fractions of a penny returned + } } return ( $charge, $item_type );