Bug 17140: Make rounding syspref controlled
[koha.git] / members / paycollect.pl
index e340750..bbd4b5a 100755 (executable)
@@ -137,7 +137,7 @@ if ( $pay_individual || $writeoff_individual ) {
 }
 
 if ( $total_paid and $total_paid ne '0.00' ) {
-    $total_paid = $total_due if (abs($total_paid - $total_due) < 0.01);
+    $total_paid = $total_due if (abs($total_paid - $total_due) < 0.01) && C4::Context->preference('RoundFinesAtPayment');
     if ( $total_paid < 0 or $total_paid > $total_due ) {
         $template->param(
             error_over => 1,