Skip to content

Commit

Permalink
fixed cancel_fee propagation (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjendres committed May 11, 2015
1 parent 9953e25 commit ccdf0db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension/CRM/Banking/PluginImpl/Matcher/SepaMandate.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function match(CRM_Banking_BAO_BankTransaction $btx, CRM_Banking_Matcher_
} else {
$meval->evaluate("source = {$data_parsed[$config->cancellation_cancel_fee_source]}");
}
$suggestion->setParameter('cancel_fee', $meval->evaluate($config->cancellation_cancel_fee_default));
$suggestion->setParameter('cancel_fee', number_format($meval->evaluate($config->cancellation_cancel_fee_default),2));
} catch (Exception $e) {
error_log("org.project60.banking.matcher.existing: Couldn't calculate cancellation_fee. Error was: $e");
}
Expand Down Expand Up @@ -501,7 +501,7 @@ public function update_parameters(CRM_Banking_Matcher_Suggestion $match, $parame
$match->setParameter('cancel_reason', $parameters['cancel_reason']);
}
if ($config->cancellation_cancel_fee) {
$match->setParameter('cancel_fee', (float) $parameters['cancel_fee']);
$match->setParameter('cancel_fee', number_format((float) $parameters['cancel_fee'], 2));
}
}
}
Expand Down

0 comments on commit ccdf0db

Please sign in to comment.