Bug 17140: fix rounding errors when paying fines
[koha.git] / members / pay.pl
index a490e58..73b87fa 100755 (executable)
@@ -99,6 +99,7 @@ elsif ( $input->param('confirm_writeoff') ) {
 
     my $accountline = Koha::Account::Lines->find( $accountlines_id );
 
+    $amount = $accountline->amountoutstanding if (abs($amount - $accountline->amountoutstanding) < 0.01);
     if ( $amount > $accountline->amountoutstanding ) {
         print $input->redirect( "/cgi-bin/koha/members/paycollect.pl?"
               . "borrowernumber=$borrowernumber"