if (array_key_exists($params['financial_type_id'], $taxRates)) {
$field['options'][key($field['options'])]['tax_rate'] = $taxRates[$params['financial_type_id']];
$taxAmount = CRM_Contribute_BAO_Contribution_Utils::calculateTaxAmount($field['options'][key($field['options'])]['amount'], $field['options'][key($field['options'])]['tax_rate']);
- $field['options'][key($field['options'])]['tax_amount'] = round($taxAmount['tax_amount'],2);
+ $field['options'][key($field['options'])]['tax_amount'] = round($taxAmount['tax_amount'], 2);
$lineItem = self::setLineItem($field, $lineItem, key($field['options']));
$totalTax += $field['options'][key($field['options'])]['tax_amount'] * $lineItem[key($field['options'])]['qty'];
}
})
cj("#currency").on("change",function(){
- cj('#total_amount').trigger("change");
+ cj('#total_amount').trigger("change");
})
cj('#total_amount').on("change",function(event) {
var currencySymbol = currencies[currencySelect];
var re= /\((.*?)\)/g;
for(m = re.exec(currencySymbol); m; m = re.exec(currencySymbol)){
- var currencySymbol = m[1];
+ var currencySymbol = m[1];
}
var taxRate = taxRates[financialType];
if (!taxRate) {
- taxRate = 0;
+ taxRate = 0;
}
var totalAmount = cj('#total_amount').val();
var totalTaxAmount = parseFloat(Number((taxRate/100)*totalAmount)+Number(totalAmount)).toFixed(2);