);
}
$form->postProcessPremium($premiumParams, $contribution);
-
+ if (is_array($result) && !empty($result['trxn_id'])) {
+ $contribution->trxn_id = $result['trxn_id'];
+ }
$membershipResult[1] = $contribution;
}
}
return $_cache[$contactID];
}
+
+ /**
+ * Calculate the tax amount based on given tax rate.
+ *
+ * @param float $amount amount of field.
+ * @param float $taxRate tax rate of selected financial account for field.
+ *
+ * @return array array of tax amount
+ *
+ * @access public
+ * @static
+ *
+ */
+ public static function calculateTaxAmount($amount, $taxRate) {
+ $taxAmount = array();
+ $taxAmount['tax_amount'] = ($taxRate/100) * CRM_Utils_Rule::cleanMoney($amount);
+
+ return $taxAmount;
+ }
}