Skip to content

Commit

Permalink
Check for membership type fee before applying tax
Browse files Browse the repository at this point in the history
  • Loading branch information
alexymik committed Nov 22, 2020
1 parent b316694 commit 4e089fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Member/BAO/MembershipType.php
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,9 @@ public static function getAllMembershipTypes() {
if ($types[$id]['tax_rate'] !== 0.0) {
$multiplier += ($types[$id]['tax_rate'] / 100);
}
if (!array_key_exists('minimum_fee', $types[$id])) {
$types[$id]['minimum_fee'] = 0;
}
$types[$id]['minimum_fee_with_tax'] = (float) $types[$id]['minimum_fee'] * $multiplier;
}
Civi::cache('metadata')->set($cacheString, $types);
Expand Down

0 comments on commit 4e089fd

Please sign in to comment.